[英]Wrong webkit-tap-highlight-color behavior when page as web standalone app
I'm trying to remove the highlight on tap of a web page in the iPad with the css 我正在尝试使用CSS在iPad上点击网页时删除突出显示的部分
-webkit-tap-highlight-color: rgba(0, 0, 0, 0)
This works great when using directly the browser in my iPad2. 直接在我的iPad2中使用浏览器时,这非常有用。 However if I move the page to a web app, with the a nice big icon, the behavior is not any longer working.
但是,如果我将页面移动到带有一个不错的大图标的Web应用程序,则该行为不再起作用。 Weirdo no ?
怪人没有?
Setting 设置
document.documentElement.style.webkitTouchCallout = "none"; document.documentElement.style.webkitTouchCallout =“ none”;
as pointed in this question does not work 正如这个问题所指出的那样不起作用
Some ideas, hints are welcomed 一些想法,提示受到欢迎
The combination of -webkit-tap-highlight-color
and -webkit-user-select
works for me. -webkit-tap-highlight-color
和-webkit-user-select
对我-webkit-user-select
。 You can apply these to an individual element, or html
. 您可以将它们应用于单个元素或
html
。
html {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select: none;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.