在移动Safari / Webview中防止touchstart上的灰色叠加 [英] Prevent grey overlay on touchstart in mobile Safari/Webview
问题描述
我正在webkit中构建一个iOS应用程序,因此我的整个UI都是一个webview。在webview外边界附近的任何元素的touchStart上(没有绑定到它的touchStart事件),我得到一个半透明的灰色框覆盖webview的整个区域。我已经消除了 -webkit-tap-highlight-color
或 -webkit-touch-callout
作为原因。我该怎么做才能消除这种行为?
I am building an iOS app in webkit, so my whole UI is a webview. on touchStart of any element near the outer boundary of the webview (that does not have a touchStart event bound to it), I get a translucent grey box overlay the full area of the webview. I've eliminated -webkit-tap-highlight-color
or -webkit-touch-callout
as causes. What do I do to remove this behavior?
推荐答案
只需放置此样式,您仍然可以使用默认操作但不使用灰色叠加层
just put this style, you still have the default actions but without the gray overlay
a {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
如果你想删除动作面板,只需把这个
if you want to remove the actions panel, just put this
a {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
}
你去吧!最后清理链接!
And there you go! clean links at last!
这篇关于在移动Safari / Webview中防止touchstart上的灰色叠加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!