Javascript 蓝色OnClick覆盖层
当我在Android WebView中显示html页面时,单击的元素上总是有一个蓝色的覆盖层,上面挂有href或javascript函数。我怎样才能去掉这个蓝色的覆盖物 源代码Javascript 蓝色OnClick覆盖层,javascript,android,html,webview,Javascript,Android,Html,Webview,当我在Android WebView中显示html页面时,单击的元素上总是有一个蓝色的覆盖层,上面挂有href或javascript函数。我怎样才能去掉这个蓝色的覆盖物 源代码 <html> <head> <title>Blue Overlay</title> <style> *{margin:0;padding:0;/* get rid of the default 2 pixels margin *
<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;填充:0;/*去掉默认的2像素边距*/
}
正文{背景色:#000000;}
/*按钮相关CSS*/
a、 钮扣{
背景:url(“img/icon_bt.png”)无重复滚动中心透明;
显示:块;
文本装饰:无;/*删除蓝色下划线*/
宽度:70px;
高度:70像素;
利润率:50像素;
}
a、 按钮:激活{
背景图片:url(“img/icon_bt_pressed.png”);
}
我不确定,但可能图像有蓝色覆盖层(而不仅仅是链接对应的a标签)。因此,通过如下方式摆脱它:border:0代码>..我用了一个不同的图像,它似乎可以工作。基本上,我只是补充了a中的建议:
也许这有关系?
a:button {
...
-webkit-tap-highlight-color: rgba(0,0,0,0);
}