网络编程
位置:首页>> 网络编程>> JavaScript>> js阻止移动端页面滚动的两种方法

js阻止移动端页面滚动的两种方法

作者:13611606223  发布时间:2023-08-04 17:36:12 

标签:js,页面,滚动

方法一:


$(document).on('touchmove',function(e){
e.preventDefault();
})

方法二:

position: fixed;top:0;left: 0;

来源:http://www.qdfuns.com/notes/31954/361c015d478ee8a07ac24323e053640c.html

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com