From 26d3d62515b3911f6a3f87e6161b9491cb02d8de Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Wed, 14 Nov 2018 11:35:08 +0800 Subject: Add Hero layout #380 --- docs/elements/media.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'docs/elements/media.html') diff --git a/docs/elements/media.html b/docs/elements/media.html index 2495c9b..2ba89d7 100644 --- a/docs/elements/media.html +++ b/docs/elements/media.html @@ -76,6 +76,8 @@ + @@ -202,9 +204,11 @@

Media includes responsive images, figures and video classes.

Images

Add the img-responsive class to <img> elements. The images will scale with the parent sizes.

-
+
macOS El Capitan Wallpaper
+
<img src="img/osx-el-capitan.jpg" class="img-responsive ..." alt="...">
+

Add the img-fit-contain or img-fit-cover class to <img> or <video> elements. The media will crop itself to fit inside the element (and you don't need another container). This feature can replace the classic background image trick. Microsoft Edge support is shipped with Build Number 16299+.

@@ -220,8 +224,7 @@
-
<img src="img/osx-el-capitan.jpg" class="img-responsive ..." alt="...">
-<img src="img/osx-el-capitan.jpg" class="img-fit-contain ..." alt="...">
+            
<img src="img/osx-el-capitan.jpg" class="img-fit-contain ..." alt="...">
 <img src="img/osx-el-capitan.jpg" class="img-fit-cover ..." alt="...">
 

Figure

@@ -238,6 +241,11 @@ +
<figure class="figure">
+  <img class="img-responsive ..." src="img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper">
+  <figcaption class="figure-caption text-center">macOS Yosemite wallpaper</figcaption>
+</figure>
+

Video

For responsive video, add a container with the video-responsive class. Insert any YouTube, Youku or other iframe/embed video inside the container. -- cgit v1.3.1-26-gb76a