使用Cursor:Pointer触摸/按下对象时禁用蓝色突出显示 [英] Disable Blue Highlight when Touch/Press object with Cursor:Pointer
本文介绍了使用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 effect 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触摸/按下对象时禁用蓝色突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文