在移动端设置overflow:hidden禁止滚动的解决方法
如果你是将overflow:hidden用在了body上那么不管用,因为移动端是基于touch事件。
两种解决方法:
1、为html和body同时设置height:100%;overflow:hidden;
html, body{ height:100%; overflow:hidden; }
2、使用touchmove
$(document).on('touchmove',function (e){ e.preventDefault(); });