遮罩层位position:fixed定位

弹框为position:absolute定位

弹框弹起时

$("html,body").css({
    "width": "100%",
    "height": "100%",
    "overflow": "hidden", 
    "position": "fixed"
})

弹框关闭时

$("html,body").css({
    "width": "auto",
    "height": "auto",
    "overflow": "auto", 
    "position": "static"
})

 

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-02-13
相关资源
相似解决方案