本以为可以靠 CSS 实现,结果事与愿违,最终还是要靠 JS 实现...
//阻止默认的处理方式(阻止下拉滑动的效果)
//passive 参数不能省略,用来兼容ios和android
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
本以为可以靠 CSS 实现,结果事与愿违,最终还是要靠 JS 实现...
//阻止默认的处理方式(阻止下拉滑动的效果)
//passive 参数不能省略,用来兼容ios和android
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
You come to this world, You need to see the sun...