本文介绍了三星Galaxy Tab 10.1和-webkit抽头高亮颜色样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图关闭默认的Andr​​oid网络'突出'(-webkit的抽头高亮色彩风格,到处都建议'修复') - 这适用于大多数的设备很好,但不是我的Galaxy Tab 10.1 - 以点击处理任何事情,总是会得到默认高亮显示,当它在浏览器点击黑色

I'm trying to turn off the default Android web 'highlighting' (the -webkit-tap-highlight-color style 'fix' that is recommended everywhere) - this works great on most devices, but not my Galaxy Tab 10.1 - anything with a 'click' handler, will always get highlighted in the default 'dark' colour when it is 'clicked' in the browser.

如:

我有这个在我的CSS:

I have this in my CSS :

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}


  • 然后使用jQuery建立一个点击投手上一个div:

    • then using jQuery setting up a 'click' hander on a div :

      < DIV ID =测试>某种内容< / DIV>

      < div id="test" >some kind of contents< / div >

      与code,如:

      $(#文)点击(函数(五){警报(你好!)});

      $("#text").click(function(e) { alert("Hello !") } );

      与简单code,在Galaxy Tab的10.1浏览器中运行,你总能得到'亮点'的分区,这似乎完全忽略风格?

      with that simple code, running in the Galaxy Tab 10.1 browser, you always get the 'highlight' on the div, it appears to ignore the style completely ?

      任何人有什么想法?看来,用touchstart'和'touchend事件,此消失取决于'水平',我捕捉到在这些活动中,但似乎有点小题大做 - 有什么特别之处Galaxy Tab的浏览器?我尝试过搜索,但有条款的这么多的组合来寻找我迷路了:(

      Anyone have any ideas ? It appears that by using 'touchstart' and 'touchend' events this goes away depending on the 'level' that I capture those events at, but that seems like overkill - is there anything special about the Galaxy Tab browser ? I've tried searching, but there's so many combinations of terms to look for I'm lost :(

      感谢

      克里斯

      推荐答案

      尝试给它比默认的任何颜色等!例如-webkit抽头高亮颜色:RGBA(58,52,222,0.5);

      try giving it any any color other than the default! e.g. -webkit-tap-highlight-color: rgba(58, 52, 222, 0.5);

      在一些地方我试图更改默认的高亮颜色的Andr​​oid设备,它最终确保颜色永远不会奏效!

      On some Android devices where I have tried to change the default highlight color, it ends up making sure the color never works!

      -and一旦你已经检查了这一点,尝试加入!在颜色的最后重要的是,人似乎逼退默认颜色!

      -And once you've checked that out, try adding !important at the end of the color, that one seems to force back the default color!

      这篇关于三星Galaxy Tab 10.1和-webkit抽头高亮颜色样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 23:09