本以为可以靠 CSS 实现,结果事与愿违,最终还是要靠 JS 实现...

//阻止默认的处理方式(阻止下拉滑动的效果)
//passive 参数不能省略,用来兼容ios和android
document.body.addEventListener('touchmove', function (e) {
  e.preventDefault();
}, {passive: false});
Like The Article To View All

All Comments

Leave a Reply Cancel Reply

Tips: Your email address will not be disclosed!

If you can't see clearly,please click to change...