我在 iPad 上运行我的网站时遇到了一个问题。即使我在屏幕上进行触摸,ipad 也不会发出咔哒声。
我通过在 html 主体上应用以下 css 克服了这个问题:
cursor: pointer;
现在,当我离开时,它会将触摸检测为点击事件。但是,这会导致屏幕闪烁。
下面是我的意思:
.div2 {
cursor: pointer;
}
<div class="div1">
<p>
div one has no flicker
</p>
</div>
<div class="div2">
<p>
This one flickers when clicked on a touch screen or device mode on chrome
</p>
</div>
我该如何解决这个副作用?还是有其他选择?我想尽可能避免使用太多 jQuery/javascript。
最佳答案
你试过吗?
@media only screen and (device-width: 768px) {
.div2{
cursor:default;
}
}
关于css - 光标指针导致 iPad 闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30574207/