Created
September 13, 2016 06:47
-
-
Save lucasreppewelander/e7020805a2a1174e5c11dae377e9d2df to your computer and use it in GitHub Desktop.
16:9 css hack
This file contains 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
.video-wrapper { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 25px; | |
height: 0; | |
} | |
.video-wrapper video { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
<div class="video-wrapper"> | |
<video /> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment