在WebView中禁用div上的橙色突出显示

Jav*_*ior 2 css android webview cordova

我正在制作PhoneGap Android应用程序,并且无法关闭橙色突出显示可点击元素.

我已经尝试了CSS的所有组合:-webkit-tap-highlight-color,-webkit-focus-ring-color和-webkit-user-modify,如

禁用焦点上的橙色轮廓高亮
在Android中的链接周围禁用橙色高亮显示

这是我拥有的,它没有做任何事情:

`* {  
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;   
    -webkit-focus-ring-color: rgba(255, 255, 255, 0) !important;  
    outline: none !important;  
    -webkit-user-modify: read-write-plaintext-only !important;  
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}`
Run Code Online (Sandbox Code Playgroud)

我正在使用Phonegap 2.9.0和Android 4.1.2,以及来自这里的Calendario插件:http://tympanus.net/codrops/2012/11/27/calendario-a-flexible-calendar-plugin/

是否有希望禁用这种难看的有机物呢?

rot*_*oxl 9

也许你在谈论设置的大纲focus,所以这应该有帮助(未经测试):

div:focus, div:active {
    outline: none;
}
Run Code Online (Sandbox Code Playgroud)

  • 我很惊讶这个答案没有得到更多的爱.这是Android 4.0中唯一对我有用的东西.请注意,上面有一个拼写错误 - 它应该是`div:focus,div:active {outline:none; 验证此属性是否有效可能很有用.我使用以下方法:`div:focus {outline:1px solid green; } div:focus {outline:1px solid red; }` (2认同)