当我在 Android WebView 中显示一个 html 页面时,点击的元素上总是有一个蓝色的覆盖层,它有一个 href 或一个 javascript 函数。我如何摆脱这个蓝色覆盖层?
源代码
<html>
<head>
<title>Blue Overlay</title>
<style>
*{margin:0;padding:0;/* get rid of the default 2 pixels margin */
}
body{background-color: #000000;}
/* button-related CSS */
a.button{
background: url("img/icon_bt.png") no-repeat scroll center center transparent;
display: block;
text-decoration: none;/*remove the blue underline*/
width: 70px;
height: 70px;
margin: 50px;
}
a.button:active{
background-image: url("img/icon_bt_pressed.png");
}
</style>
</head>
<body>
<a class="button" href="#"></a>
</body>
</html>
最佳答案
我已经 tried it以不同的形象,它似乎工作。基本上,我只是添加了 different topic 中建议的内容。 :
a:button {
...
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
关于javascript - OnClick 的蓝色覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14115665/