Created
February 13, 2015 20:51
-
-
Save iksi/d2139cbcf4cc6d6073bd 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
/* 16:9 example */ | |
div { | |
width: 100vw; | |
height: 56.25vw; /* 100/56.25 = 1.778 */ | |
background: pink; | |
max-height: 100vh; | |
max-width: 177.78vh; /* 16/9 = 1.778 */ | |
margin: auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment