Created
May 29, 2018 03:15
-
-
Save n8kowald/d265d36480411db81a4444f55a791a53 to your computer and use it in GitHub Desktop.
Bootstrap 4 responsive embeds CSS
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
/* Compiled CSS from Bootstrap 4's responsive embeds */ | |
.embed-responsive { | |
position: relative; | |
display: block; | |
width: 100%; | |
padding: 0; | |
overflow: hidden | |
} | |
.embed-responsive::before { | |
display: block; | |
content: "" | |
} | |
.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video { | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
border: 0 | |
} | |
.embed-responsive-21by9::before { | |
padding-top: 42.85714% | |
} | |
.embed-responsive-16by9::before { | |
padding-top: 56.25% | |
} | |
.embed-responsive-4by3::before { | |
padding-top: 75% | |
} | |
.embed-responsive-1by1::before { | |
padding-top: 100% | |
} | |
/** | |
* HTML Usage: | |
* <div class="embed-responsive embed-responsive-16by9"> | |
* <iframe class="embed-responsive-item" src="..."></iframe> | |
* </div> | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment