如果你是將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(); });
如果你是將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(); });
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。