Chrome浏览器触摸屏链接点击阴影取消
更新:2021-07-01 13:40:25
人气:858
来源:本站原创
A+
由IE转为Chrome浏览器做全屏显示时,在PC端用鼠标点击没有任何异常。但换到触摸屏幕时,点击链接或是将链接以onclick事件绑定到DIV时,点击时会有一个方形的阴影,特别影响页面显示效果,具体解决办法如下:
#anniu_index { position:absolute; width:200px; height:200px; padding-top:5px; text-align:center; display:block; z-index:1; right:5px; top:5px; cursor:pointer; outline:none; -webkit-tap-highlight-color: rgba(0,0,0,0); }
里面最关键的一句CSS代码:
-webkit-tap-highlight-color: rgba(0,0,0,0);
推荐的文章
随手记
PHP经验分享