移动端cursor pointer问题

2016-10-25 04:00:10css问题

移动端 给div设置cursor:pointer会导致点击时出现一个蓝色背景

image.png

简单的几行代码

<div>test<div>
<style>
div{
    cursor:pointer;
}
</style>

移动端点击这个div时,会出现一个蓝色背景,这是怎么来的?如何解决呢?

热门评论:

  • _CRY _CRY 2016-10-25 4:06 回复:

    什么浏览器上


  • jsoncode jsoncode 2016-10-25 4:14 回复:
    chrome,微信,qq,手机自带浏览器,还有safari是灰色背景

网友回答:

  • czl czl 2016-10-25 4:11 回复:
    已被采纳
*{
    -webkit-tap-highlight-color: transparent;
 }