diff options
ADD: Figure element support and doc
1 files changed, 22 insertions, 5 deletions
| -rw-r--r-- | index.html | 27 |
@@ -1033,31 +1033,48 @@ <section id="media" class="container grid-960"> <header class="text-center"><h4>media</h4></header> <section class="notes"> - <p><strong>Media</strong> include responsive image and video class. </p> + <p><strong>Media</strong> include responsive images, figures and video classes. </p> + <p>Add the class <code>img-responsive</code> to <img> elements. The images will scale with the parent sizes.</p> </section> <div class="columns"> <div class="column col-6 col-xs-12"> <img src="demo/img/osx-el-capitan.jpg" class="img-responsive rounded" /> </div> </div> + <section class="notes"> - <p>Add the class <code>img-responsive</code> to <img> elements. The images will scale with the parent sizes.</p> + <p>You can use the element <code><figure></code> for an image with a caption. Add the class <code>figure</code> to <figure> element. The images with the class <code>img-responsive</code> will be responsive. And the included class <code>figure-caption</code> will provide basic style for caption. Also, you can use <code>text-left</code>, <code>text-center</code> and <code>text-right</code> for caption alignment. </p> </section> <div class="columns"> <div class="column col-6 col-xs-12"> - <div class="video-responsive"> - <iframe src="https://www.youtube.com/embed/vBfBa-gCMQk" width="560" height="315" frameborder="0" allowfullscreen></iframe> - </div> + <figure class="figure"> + <img src="demo/img/osx-yosemite-2.jpg" class="img-responsive rounded" /> + <figcaption class="figure-caption text-center">macOS Yosemite wallpaper</figcaption> + </figure> + </div> </div> + <section class="notes"> <p>For responsive video, add a container with the class <code>video-responsive</code>. Insert any YouTube, Youku or other iframe/embed video inside the container. The ratio is 16:9 by default. You may add <code>.video-responsive-4-3</code> for 4:3 ratio video container.</p> </section> + <div class="columns"> + <div class="column col-6 col-xs-12"> + <div class="video-responsive"> + <iframe src="https://www.youtube.com/embed/vBfBa-gCMQk" width="560" height="315" frameborder="0" allowfullscreen></iframe> + </div> + </div> + </div> <!-- media example --> <pre class="code lang-html"> <<span class="tag">img</span> <span class="atn">src</span>=<span class="atv">"img/osx-el-capitan.jpg"</span> <span class="atn">class</span>=<span class="atv">"img-responsive rounded"</span> /> +<<span class="tag">figure</span> <span class="atn">class</span>=<span class="atv">"figure"</span>> + <<span class="tag">img</span> <span class="atn">src</span>=<span class="atv">"img/osx-yosemite-2.jpg"</span> <span class="atn">class</span>=<span class="atv">"img-responsive rounded"</span> /> + <<span class="tag">figcaption</span> <span class="atn">class</span>=<span class="atv">"figure-caption text-center"</span>>macOS Yosemite wallpaper<<span class="tag">/figcaption</span>> +<<span class="tag">/figure</span>> + <<span class="tag">div</span> <span class="atn">class</span>=<span class="atv">"video-responsive"</span>> <<span class="tag">iframe</span> <span class="atn">src</span>=<span class="atv">"https://www.youtube.com/embed/vBfBa-gCMQk"</span> <span class="atn">width</span>=<span class="atv">"560"</span> <span class="atn">height</span>=<span class="atv">"315"</span> <span class="atn">frameborder</span>=<span class="atv">"0"</span> <span class="atn">allowfullscreen</span>><<span class="tag">/iframe</span>> <<span class="tag">/div</span>> |