From 597b71f18ef3d0544d7d7cb57bc8df0917cdace7 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Thu, 14 Apr 2016 19:11:26 +0800 Subject: add responsive video code --- index.html | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index c74968c..f7a2d0f 100644 --- a/index.html +++ b/index.html @@ -138,7 +138,7 @@ tables buttons forms - images + media @@ -769,26 +769,37 @@ -
-

images

+
+

media

-

Images include responsive image class.

+

Media include responsive image and video class.

+
+
+

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.

+

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.

- +
 <img src="img/osx-el-capitan.jpg" class="img-responsive rounded" />
+
+<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-23-gd82d