I'm using this javascript part to hide or no scrollbar when my modal is open or no, but iPhone and iPad don't hide my scroll anyway ? The problem comes from position relative ?
here is my javascript code
function openNav() {
document.getElementById("myNav").style.cssText = "height:100%";
document.body.style.overflow = "hidden";
}
function closeNav() {
document.getElementById("myNav").style.cssText = "height:0%";
document.body.style.overflow = "scroll";
}
to resolve my problem for the modal I need to add
-webkit-overflow-scrolling:touch
in my CSS file here
*, *:after, *:before {
But the problem still exist when i try to open my fullscreen menu !!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.