一、zepto.js

zepto tap “点透”研究

简介:在ios上的safari浏览器中,两个绝对定位叠加的块儿,在点击触发上面这层的tap事件后会同时触发被遮挡在下面一层的click事件,俗称“点透”。

应对:

1、github上有一个叫做fastclick的库,它也能规避移动设备上click事件的延迟响应,https://github.com/ftlabs/fastclick

$(function(){
    new FastClick(document.body);
})

2、用touchend来代替tap

相关文章:

  • 2022-12-23
  • 2021-08-23
  • 2022-01-08
  • 2021-08-30
  • 2022-12-23
  • 2021-12-05
  • 2021-09-24
猜你喜欢
  • 2021-11-17
  • 2021-07-24
  • 2021-08-29
  • 2021-08-24
  • 2022-02-24
相关资源
相似解决方案