Created
January 2, 2019 16:50
-
-
Save artursopelnik/3e6fb63ca6d8ef99a184e79395f47066 to your computer and use it in GitHub Desktop.
responsive-embed 16:9
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
.responsive-embed { | |
position: relative; | |
height: 0; | |
margin-bottom: 1rem; | |
padding-bottom: (9 / 16) * 100%; | |
overflow: hidden; | |
iframe, | |
object, | |
embed, | |
video { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment