diff options
| author | Fabien <[email protected]> | 2013-12-30 05:52:00 +0100 |
|---|---|---|
| committer | Fabien <[email protected]> | 2013-12-30 05:52:00 +0100 |
| commit | 29e495f03cda05fd7fc362420ae86619c27b582e (patch) | |
| tree | 656b26c6962d2a9a68c5f2dd27c8c70cc4510fc1 /css.html | |
| parent | a2aaf80c7e9f1848926e2c8817ee8475c8b30b43 (diff) | |
| download | bootstrap-29e495f03cda05fd7fc362420ae86619c27b582e.tar.xz bootstrap-29e495f03cda05fd7fc362420ae86619c27b582e.zip | |
Add Embed responsive utility
Diffstat (limited to 'css.html')
| -rw-r--r-- | css.html | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -2576,6 +2576,21 @@ For example, <code><section></code> should be wrapped as inline. .text-hide(); } {% endhighlight %} + + <h3 id="helper-classes-embeds-responsive">Embeds responsive</h3> + <p>Allows browsers to determine videos or slideshow dimensions based on the width of their containing block to create an intrinsic ratio that will properly scale on any device.</p> + <p>Rules are directly apply to <code><iframe></code>, <code><embed></code> and <code><object></code> elements, optionally use of an explicit descendant class <code>.embed-responsive-item</code> when you want to match the styling for other attributes.</p> +{% highlight html %} +<!-- 16:9 aspect ratio --> +<div class="embed-responsive embed-responsive-16by9"> + <iframe class="embed-responsive-item" src="…"></iframe> +</div> + +<!-- 4:3 aspect ratio --> +<div class="embed-responsive embed-responsive-4by3"> + <iframe class="embed-responsive-item" src="…"></iframe> +</div> +{% endhighlight %} </div> |
