Iphone darkens div on click

白昼怎懂夜的黑 提交于 2019-12-05 01:15:27

问题


When you have a div with a click handler attached, the iphone darkens the div as a click indicator, when the div is clicked.

Example: view on mobile safari http://jsbin.com/awejo3/4

My question is, how do I turn this behavior off? This is probably useful for most iphone users, but in some types of rich media applications, this is bad.

Thanks.


回答1:


You can set the "tap hightlight color" to transparent in css.

html
{
  -webkit-tap-highlight-color:transparent;
}


来源:https://stackoverflow.com/questions/2355154/iphone-darkens-div-on-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!