When I set the submenu in css as follows, the scroll stops in the middle of the submenu on my smartphone, and
The rest of the sub cannot scroll until you have finished scrolling through the body part.
How should I deal with it?
#submenu{
height —100%;
width —80%;
overflow:scroll;
}
Is it the image that when you button something, the menu opens and the menu is displayed vertically?
If it's okay to stop scrolling through the main unit while the menu is open, why don't you do that?
body.locked{
overflow-y — hidden;
}
/* Add this class to the body when the menu is open*/
#submenu{
height —100%;
width —80%;
overflow —auto;
position:fixed;
z-index:100;
}
© 2024 OneMinuteCode. All rights reserved.