简体   繁体   中英

How to hide element in a Android Webview app using a Bootstrap website?

I've made a Android webview app of my bootstrap 3 website.

Now I want to place something like this in the header of the website

<div class="visible-xs">{google play icon to promote the app}</div>

This element should be visible when opening the website on a mobile. But hidden when opening the webview app.

The ideal solution would be if this can be done by changing/adding a code on the website, rather then in the webview app.

Is this possible?

You can try using CSS media queries .

I mean something like this:

.visible-xs{
    visibility: visible;
}

@media (max-width: 1000px) {

    .visible-xs {
        visibility: hidden;
    }

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM