当页面作为Web独立应用程序时,webkit-tap-highlight-color行为错误

ic3*_*ic3 2 javascript ipad ios ios5 iphone-standalone-web-app

我正在尝试使用CSS在iPad上点击网页时删除突出显示的部分

-webkit-tap-highlight-color: rgba(0, 0, 0, 0)
Run Code Online (Sandbox Code Playgroud)

直接在我的iPad2中使用浏览器时,这非常有用。但是,如果我将页面移动到带有一个不错的大图标的Web应用程序,则该行为不再起作用。怪人没有?

设置

document.documentElement.style.webkitTouchCallout =“ none”;

正如这个问题所指出的那样不起作用

一些想法,提示受到欢迎

Thi*_*iff 5

的组合-webkit-tap-highlight-color,并-webkit-user-select为我的作品。您可以将它们应用于单个元素,或html

html {
    -webkit-tap-highlight-color: rgba(0,0,0,0); 
    -webkit-user-select: none;
}
Run Code Online (Sandbox Code Playgroud)