aboutsummaryrefslogtreecommitdiff
path: root/css.html
diff options
context:
space:
mode:
authorFabien <[email protected]>2013-12-30 05:52:00 +0100
committerFabien <[email protected]>2013-12-30 05:52:00 +0100
commit29e495f03cda05fd7fc362420ae86619c27b582e (patch)
tree656b26c6962d2a9a68c5f2dd27c8c70cc4510fc1 /css.html
parenta2aaf80c7e9f1848926e2c8817ee8475c8b30b43 (diff)
downloadbootstrap-29e495f03cda05fd7fc362420ae86619c27b582e.tar.xz
bootstrap-29e495f03cda05fd7fc362420ae86619c27b582e.zip
Add Embed responsive utility
Diffstat (limited to 'css.html')
-rw-r--r--css.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/css.html b/css.html
index 6520efdfa..42f26e7df 100644
--- a/css.html
+++ b/css.html
@@ -2576,6 +2576,21 @@ For example, <code>&lt;section&gt;</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>&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>