当我在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>
答案 0 :(得分:10)
我tried it有不同的形象,似乎有用。基本上,我刚刚添加了different topic中建议的内容:
a:button {
...
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
答案 1 :(得分:0)
我不确定,但也许图像有蓝色覆盖(而不仅仅是链接resp.a-tag)。所以通过border: 0;
...