弹出遮罩层后禁止滚动效果【实现代码】

内容摘要
方法一:


$('.shade').bind( "touchmove", function (e) {
e.preventDefault();
});


方法二:


$("body,.main").height($(window).height()).css({
"overflow-y": "h
文章正文

方法一:

$('.shade').bind( "touchmove", function (e) {
   e.preventDefault();
});

方法二:

$("body,.main").height($(window).height()).css({
  "overflow-y": "hidden"
});

以上这篇弹出遮罩层后禁止滚动效果【实现代码】就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持phpstudy。


代码注释

作者:喵哥笔记

IDC笔记

学的不仅是技术,更是梦想!