我在 iPhone 应用程序中有一个 UIWebView
。在 html 代码中有一个名为 loadedBar 的大图像,它具有绑定(bind)到它的效果,使用 jQuery,方法如下:
$('#loadedBar').click(function(){ ... });
函数里的一切都OK,但是有一个我不需要的可视化效果。单击图像时,它会在几分之一秒内变为灰色。我在带有事件的 div 上发现了相同的行为,绑定(bind)方式与图像相同。
这是默认的 UIWebView
event-click-visualisation 吗?有没有办法将其关闭(某些 CSS 规则可能会起作用),以便应用程序的行为像 native 应用程序一样。
有什么想法吗?
最佳答案
您正在寻找:
-webkit-tap-highlight-color:<css-color>
This is an inherited property that changes the tap highlight color, obeying the alpha value. If you don’t specify an alpha value, Safari on iOS applies a default alpha value to the color. To disable tap highlighting, set the alpha to 0 (invisible). If you set the alpha to 1.0 (opaque), then the element won’t be visible when tapped.
禁用属性的示例:
-webkit-tap-highlight-color:rgba(0,0,0,0);
关于html - UIWebView 中讨厌的事件点击可视化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12941910/