2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-30 15:24:08 +03:00

Add Embed responsive utility

This commit is contained in:
Fabien
2013-12-30 05:52:00 +01:00
parent a2aaf80c7e
commit 29e495f03c
6 changed files with 78 additions and 2 deletions
+15
View File
@@ -2575,6 +2575,21 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
.heading {
.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>&lt;iframe&gt;</code>, <code>&lt;embed&gt;</code> and <code>&lt;object&gt;</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>