移动端页面开发,到底用Click多还是Touch事件多?300ms真的有影响吗?有必要用touch事件吗?
In mobile page development, should we use more Click or Touch events? -PHP Chinese website Q&A-In mobile page development, should you use more Click or Touch events? -PHP Chinese website Q&A
Let’s take a look and learn.
首先,直接用touch事件是不靠谱的,因为比如滑动之类的也会触发touchStart,touchEnd,即便是zepto的tap也是用touch模拟的其次,300ms真的有影响,感知上确实要慢一些,建议用fastclick或者zepto那种模拟的tap
In mobile page development, should we use more Click or Touch events? -PHP Chinese website Q&A-In mobile page development, should you use more Click or Touch events? -PHP Chinese website Q&A
Let’s take a look and learn.
首先,直接用touch事件是不靠谱的,因为比如滑动之类的也会触发touchStart,touchEnd,即便是zepto的tap也是用touch模拟的
其次,300ms真的有影响,感知上确实要慢一些,建议用fastclick或者zepto那种模拟的tap