Iphone会点击div使div变暗 [英] Iphone darkens div on click

查看:127
本文介绍了Iphone会点击div使div变暗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您有一个带有点击处理程序的div时,iPhone会将div作为点击指示符加以点亮。

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

示例:在移动设备上查看safari
http://jsbin.com/awejo3/4

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

我的问题是,如何关闭此行为?这对大多数iphone用户可能是有用的,但在某些类型的富媒体应用程序中,这是坏的。

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.

谢谢。

推荐答案

您可以在css中将tap hightlight color设置为transparent。

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

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

这篇关于Iphone会点击div使div变暗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆