本文介绍了使用 Cursor:Pointer 触摸/按下对象时禁用蓝色突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每当在 Chrome 中触摸应用了 cursor:pointer 属性的 Div 时,就会出现一个蓝色突出显示.我们怎样才能摆脱它?
There is a blue highlight that appears whenever a Div that has the cursor:pointer property applied is touched in Chrome.How can we get rid of it?
我尝试了以下方法:
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
但它们不会影响按下光标时的蓝色突出显示.
But they do not affect the blue highlighting on press of a cursor.
推荐答案
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
解决这个问题,因为它将高光颜色设置为透明.
Takes care of the problem, as it sets the highlight color transparent.
来源:http:///samcroft.co.uk/2012/alternative-to-webkit-tap-highlight-color-in-phonegap-apps/
这篇关于使用 Cursor:Pointer 触摸/按下对象时禁用蓝色突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!