Last active
May 19, 2019 09:23
-
-
Save DennisLypovetsky/d94391b5bdad97a1e7020225d0b04e62 to your computer and use it in GitHub Desktop.
hero-height.js
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
| // Правит не работающую как надо формулу CSS height: 100vh | |
| const height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) | |
| document.getElementsByClassName('YOURCLASS')[0].style['min-height'] = height + 'px' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment