From 511088d794a35b142239e868d2c3ce23dbdfccfb Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 1 Jan 2017 15:00:36 +0800 Subject: ADD: Figure element support and doc --- index.html | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 5360102..17ad29b 100644 --- a/index.html +++ b/index.html @@ -1033,31 +1033,48 @@

media

-

Media include responsive image and video class.

+

Media include responsive images, figures and video classes.

+

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

+
-

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

+

You can use the element <figure> for an image with a caption. Add the class figure to <figure> element. The images with the class img-responsive will be responsive. And the included class figure-caption will provide basic style for caption. Also, you can use text-left, text-center and text-right for caption alignment.

-
- -
+
+ +
macOS Yosemite wallpaper
+
+
+

For responsive video, add a container with the class video-responsive. Insert any YouTube, Youku or other iframe/embed video inside the container. The ratio is 16:9 by default. You may add .video-responsive-4-3 for 4:3 ratio video container.

+
+
+
+ +
+
+
 <img src="img/osx-el-capitan.jpg" class="img-responsive rounded" />
 
+<figure class="figure">
+    <img src="img/osx-yosemite-2.jpg" class="img-responsive rounded" />
+    <figcaption class="figure-caption text-center">macOS Yosemite wallpaper</figcaption>
+</figure>
+
 <div class="video-responsive">
     <iframe src="https://www.youtube.com/embed/vBfBa-gCMQk" width="560" height="315" frameborder="0" allowfullscreen></iframe>
 </div>
-- 
cgit v1.3.1-26-gb76a