Created
July 31, 2022 09:27
-
-
Save ramzs/eefa1bbffce1896f4f091001aab1be12 to your computer and use it in GitHub Desktop.
Авто высота мобильного меню в мобильных браузерах чтобы не скрывалось за нижней плашкой браузера
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const appHeight = () => { | |
let vh = window.innerHeight * 0.01; | |
document.documentElement.style.setProperty('--vh', `${vh}px`); | |
}; | |
appHeight(); | |
window.addEventListener('resize', appHeight); | |
window.addEventListener('load', appHeight); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment