//禁止滚动条滚动
function unScroll() {
    var top = $(document).scrollTop();
    $(document).on('scroll.unable',function (e) {
        $(document).scrollTop(top);
    })
}

  


//移除禁止滚动条滚动
function removeUnScroll() {
    $(document).unbind("scroll.unable");
}

  

$('body').css('overflow','hidden');页面滚动条消失,页面大小会变

个人博客 :很多好用的 npm 包 , 可以看看  https://gilea.cn/ 

 

github:  https://github.com/longfei59418888/vui   (很不错的vue2.0组件库,记得给一个 start,以后有一起讨论,各种好组件)

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2022-01-01
  • 2022-01-08
  • 2022-12-23
  • 2021-11-07
  • 2021-12-30
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案