[英]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.我已经为我的 bootstrap 3 网站制作了一个 Android webview 应用程序。
Now I want to place something like this in the header of the website现在我想在网站的 header 中放置这样的东西
<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.
但在打开 webview 应用程序时隐藏。
The ideal solution would be if this can be done by changing/adding a code on the website, rather then in the webview app.理想的解决方案是,如果这可以通过在网站上更改/添加代码来完成,而不是在 webview 应用程序中完成。
Is this possible?这可能吗?
You can try using CSS media queries .您可以尝试使用 CSS 媒体查询。
I mean something like this:我的意思是这样的:
.visible-xs{
visibility: visible;
}
@media (max-width: 1000px) {
.visible-xs {
visibility: hidden;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.