search

Home  >  Q&A  >  body text

javascript - On the mobile terminal, when a mask layer appears, there are divs in the mask layer that exceed the scroll height. How to prevent the body from sliding with it when the div is slid?

1. Add overflow:hidden to the body when clicking to exclude the mask layer, because when the body slides to the bottom and clicks again to display the mask layer, the body will jump to the top by default, and the mask layer is positioned at top. :0;left:0;position:fixed;
2. Exclude the bubbling behavior when p slides, because the scroll event accepts bubbling, but does not support blocking default events and bubbling behavior;
3 , I have tried many times, please give me some advice!

过去多啦不再A梦过去多啦不再A梦2715 days ago921

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-26 10:58:22

    I have been thinking about it for a long time and still haven’t solved it. Now I have completed various searches through the iscroll.js plug-in. Since the p height of the mask layer is automatically expanded, a delay is needed when calling it

    reply
    0
  • Cancelreply