0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Add 21x9 responsive embed modifier

- Credit: @adammacias
- Fixes #16499
This commit is contained in:
Mark Otto 2015-06-18 16:01:52 -07:00
parent b39ce7d6c0
commit 331b8d2250
2 changed files with 11 additions and 1 deletions

View File

@ -296,9 +296,14 @@ Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` e
</div>
{% endexample %}
Aspect ratios can be customized. There are two available in Bootstrap, 16x9 and 4x3 (two of the most common for video).
Aspect ratios can be customized with modifier classes.
{% highlight html %}
<!-- 21:9 aspect ratio -->
<div class="embed-responsive embed-responsive-21by9">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="..."></iframe>

View File

@ -26,6 +26,11 @@
}
}
// Modifier class for 21:9 aspect ratio
.embed-responsive-21by9 {
padding-bottom: 42.85%;
}
// Modifier class for 16:9 aspect ratio
.embed-responsive-16by9 {
padding-bottom: 56.25%;