Summary Files Commits Branches @commit @diff @stats
path: root / docs / elements / media.html
diff options
context:
space:
mode:
Commitef6d8056d26fe952891e47660f1cb0d1ed7041f1 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2018-11-08 07:42:33 +0800
Committer
 GitHub <noreply@github.com>
2018-11-08 07:42:33 +0800
Files26e1a053ee953a570e54939ef30c2c89636a6acf /docs/elements/media.html
Spectre-Dark-Gruvbox-ef6d8056d26fe952891e47660f1cb0d1ed7041f1.tar
Spectre-Dark-Gruvbox-ef6d8056d26fe952891e47660f1cb0d1ed7041f1.tar.gz
Spectre-Dark-Gruvbox-ef6d8056d26fe952891e47660f1cb0d1ed7041f1.zip
Parent0a6c76429b294c26d318479c05736537f3d95abb (diff)
Parenteb7fd9d2538accfe5d291ca93d2ce7dd6e62fefa (diff)
Merge pull request #522 from picturepan2/0.5.5 v0.5.5
0.5.5
1 files changed, 282 insertions, 0 deletions
-rw-r--r--docs/elements/media.html282
diff --git a/docs/elements/media.html b/docs/elements/media.html
new file mode 100644
index 0000000..2495c9b
--- /dev/null
+++ b/docs/elements/media.html
@@ -0,0 +1,282 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Media - Elements - Spectre.css CSS Framework</title>
+ <meta charset="utf-8">
+ <meta name="robots" content="index, follow">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="description" content="Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.">
+ <meta name="author" content="Yan Zhu">
+ <link rel="shortcut icon" href="../img/favicons/favicon.ico">
+ <link rel="icon" href="../img/favicons/favicon.png">
+ <link rel="stylesheet" href="../dist/spectre.min.css">
+ <link rel="stylesheet" href="../dist/spectre-icons.min.css">
+ <link rel="stylesheet" href="../dist/spectre-exp.min.css">
+ <link rel="stylesheet" href="../dist/docs.min.css">
+ <link rel="canonical" href="https://picturepan2.github.io/spectre/elements/media.html">
+ </head>
+ <body>
+ <div class="docs-container off-canvas off-canvas-sidebar-show">
+ <div class="docs-navbar"><a class="off-canvas-toggle btn btn-link btn-action" href="#sidebar"><i class="icon icon-menu"></i></a>
+ <div class="btns"><a class="btn btn-primary float-right" href="https://github.com/picturepan2/spectre" target="_blank">GitHub</a><a class="btn mr-1 float-right" href="https://www.paypal.me/picturepan2" target="_blank">Sponsor</a></div>
+ </div>
+ <div class="docs-sidebar off-canvas-sidebar" id="sidebar">
+ <div class="docs-brand"><a class="docs-logo" href="../index.html"><img src="../img/spectre-logo.svg" alt="Spectre.css CSS Framework">
+ <h2>SPECTRE</h2></a>
+ </div>
+ <div class="docs-nav">
+ <div class="accordion-container">
+ <div class="accordion">
+ <input id="accordion-getting-started" type="checkbox" name="docs-accordion-checkbox" hidden=""/>
+ <label class="accordion-header c-hand" for="accordion-getting-started">Getting started</label>
+ <div class="accordion-body">
+ <ul class="menu menu-nav">
+ <li class="menu-item"><a href="../getting-started/installation.html">Installation</a>
+ </li>
+ <li class="menu-item"><a href="../getting-started/custom.html">Custom version</a>
+ </li>
+ <li class="menu-item"><a href="../getting-started/browsers.html">Browser support</a>
+ </li>
+ <li class="menu-item"><a href="../getting-started/whatsnew.html">What's new</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="accordion">
+ <input id="accordion-elements" type="checkbox" name="docs-accordion-checkbox" hidden="" checked="checked"/>
+ <label class="accordion-header c-hand" for="accordion-elements">Elements</label>
+ <div class="accordion-body">
+ <ul class="menu menu-nav">
+ <li class="menu-item"><a href="../elements/typography.html">Typography</a>
+ </li>
+ <li class="menu-item"><a href="../elements/tables.html">Tables</a>
+ </li>
+ <li class="menu-item"><a href="../elements/buttons.html">Buttons</a>
+ </li>
+ <li class="menu-item"><a href="../elements/forms.html">Forms</a>
+ </li>
+ <li class="menu-item"><a href="../elements/icons.html">Icons</a>
+ </li>
+ <li class="menu-item"><a href="../elements/labels.html">Labels</a>
+ </li>
+ <li class="menu-item"><a href="../elements/code.html">Code</a>
+ </li>
+ <li class="menu-item"><a href="../elements/media.html">Media</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="accordion">
+ <input id="accordion-layout" type="checkbox" name="docs-accordion-checkbox" hidden=""/>
+ <label class="accordion-header c-hand" for="accordion-layout">Layout</label>
+ <div class="accordion-body">
+ <ul class="menu menu-nav">
+ <li class="menu-item"><a href="../layout/grid.html">Flexbox grid</a>
+ </li>
+ <li class="menu-item"><a href="../layout/responsive.html">Responsive</a>
+ </li>
+ <li class="menu-item"><a href="../layout/navbar.html">Navbar</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="accordion">
+ <input id="accordion-components" type="checkbox" name="docs-accordion-checkbox" hidden=""/>
+ <label class="accordion-header c-hand" for="accordion-components">Components</label>
+ <div class="accordion-body">
+ <ul class="menu menu-nav">
+ <li class="menu-item"><a href="../components/accordions.html">Accordions</a>
+ </li>
+ <li class="menu-item"><a href="../components/avatars.html">Avatars</a>
+ </li>
+ <li class="menu-item"><a href="../components/badges.html">Badges</a>
+ </li>
+ <li class="menu-item"><a href="../components/bars.html">Bars</a>
+ </li>
+ <li class="menu-item"><a href="../components/breadcrumbs.html">Breadcrumbs</a>
+ </li>
+ <li class="menu-item"><a href="../components/cards.html">Cards</a>
+ </li>
+ <li class="menu-item"><a href="../components/chips.html">Chips</a>
+ </li>
+ <li class="menu-item"><a href="../components/empty.html">Empty states</a>
+ </li>
+ <li class="menu-item"><a href="../components/menu.html">Menu</a>
+ </li>
+ <li class="menu-item"><a href="../components/modals.html">Modals</a>
+ </li>
+ <li class="menu-item"><a href="../components/nav.html">Nav</a>
+ </li>
+ <li class="menu-item"><a href="../components/pagination.html">Pagination</a>
+ </li>
+ <li class="menu-item"><a href="../components/panels.html">Panels</a>
+ </li>
+ <li class="menu-item"><a href="../components/popovers.html">Popovers</a>
+ </li>
+ <li class="menu-item"><a href="../components/steps.html">Steps</a>
+ </li>
+ <li class="menu-item"><a href="../components/tabs.html">Tabs</a>
+ </li>
+ <li class="menu-item"><a href="../components/tiles.html">Tiles</a>
+ </li>
+ <li class="menu-item"><a href="../components/toasts.html">Toasts</a>
+ </li>
+ <li class="menu-item"><a href="../components/tooltips.html">Tooltips</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="accordion">
+ <input id="accordion-utilities" type="checkbox" name="docs-accordion-checkbox" hidden=""/>
+ <label class="accordion-header c-hand" for="accordion-utilities">Utilities</label>
+ <div class="accordion-body">
+ <ul class="menu menu-nav">
+ <li class="menu-item"><a href="../utilities/colors.html">Colors</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/cursors.html">Cursors</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/display.html">Display</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/divider.html">Divider</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/loading.html">Loading</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/position.html">Position</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/shapes.html">Shapes</a>
+ </li>
+ <li class="menu-item"><a href="../utilities/text.html">Text</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="accordion">
+ <input id="accordion-experimentals" type="checkbox" name="docs-accordion-checkbox" hidden=""/>
+ <label class="accordion-header c-hand" for="accordion-experimentals">Experimentals</label>
+ <div class="accordion-body">
+ <ul class="menu menu-nav">
+ <li class="menu-item"><a href="../experimentals/autocomplete.html">Autocomplete</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/calendars.html">Calendars</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/carousels.html">Carousels</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/comparison.html">Comparison sliders</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/filters.html">Filters</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/meters.html">Meters</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/off-canvas.html">Off-canvas</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/parallax.html">Parallax</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/progress.html">Progress</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/sliders.html">Sliders</a>
+ </li>
+ <li class="menu-item"><a href="../experimentals/timelines.html">Timelines</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div><a class="off-canvas-overlay" href="#close"></a>
+ <div class="off-canvas-content">
+ <div class="docs-content" id="content">
+ <div class="container" id="media">
+ <h3 class="s-title">Media<a class="anchor" href="#media" aria-hidden="true">#</a></h3>
+ <div class="docs-ad">
+ <div class="hide-md text-center">
+ <script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+ <!-- GitHub-lg--><ins class="adsbygoogle mx-auto" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-2225124559530218" data-ad-slot="9894180784"></ins>
+ <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
+ </div>
+ <div class="show-md text-center">
+ <!-- GitHub-sm--><ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-2225124559530218" data-ad-slot="9278881734"></ins>
+ <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
+ </div>
+ </div>
+ <p>Media includes responsive images, figures and video classes.</p>
+ <h4 class="s-subtitle" id="media-images">Images<a class="anchor" href="#media-images" aria-hidden="true">#</a></h4>
+ <p>Add the <code>img-responsive</code> class to &lt;img&gt; elements. The images will scale with the parent sizes.</p>
+ <div class="columns">
+ <div class="column col-12"><img class="img-responsive rounded" src="../img/osx-el-capitan.jpg" alt="macOS El Capitan Wallpaper"></div>
+ </div>
+ <p>Add the <code>img-fit-contain</code> or <code>img-fit-cover</code> class to &lt;img&gt; or &lt;video&gt; 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 <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/objectfitandobjectposition/" target="_blank">is shipped</a> with Build Number 16299+.
+ </p>
+ <div class="docs-demo columns">
+ <div class="column col-6 col-xs-12">
+ <figure class="figure"><img class="img-fit-contain rounded" src="../img/osx-yosemite.jpg" alt="macOS Yosemite Wallpaper" style="background: #f8f9fa; height: 10rem; width: 100%;">
+ <figcaption class="figure-caption text-center">img-fit-contain</figcaption>
+ </figure>
+ </div>
+ <div class="column col-6 col-xs-12">
+ <figure class="figure"><img class="img-fit-cover rounded" src="../img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper" style="background: #f8f9fa; height: 10rem; width: 100%;">
+ <figcaption class="figure-caption text-center">img-fit-cover</figcaption>
+ </figure>
+ </div>
+ </div>
+ <pre class="code" data-lang="HTML"><code><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-responsive ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
+<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-fit-contain ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
+<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-fit-cover ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
+</code></pre>
+ <h4 class="s-subtitle" id="media-figure">Figure<a class="anchor" href="#media-figure" aria-hidden="true">#</a></h4>
+ <p>You can use the element &lt;figure&gt; for an image with a caption.
+ Add the <code>figure</code> class to &lt;figure&gt; element.
+ The images with the <code>img-responsive</code> class 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>
+ <div class="docs-demo columns">
+ <div class="column col-12">
+ <figure class="figure"><img class="img-responsive rounded" src="../img/osx-yosemite-2.jpg" alt="macOS Yosemite Wallpaper">
+ <figcaption class="figure-caption text-center">macOS Yosemite wallpaper</figcaption>
+ </figure>
+ </div>
+ </div>
+ <h4 class="s-subtitle" id="media-video">Video<a class="anchor" href="#media-video" aria-hidden="true">#</a></h4>
+ <p>For responsive video, add a container with the <code>video-responsive</code> class.
+ 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 or <code>video-responsive-1-1</code> for 1:1 ratio.
+ </p>
+ <div class="docs-demo columns">
+ <div class="column col-12">
+ <div class="video-responsive">
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/7DbslbKsQSk" allowfullscreen=""></iframe>
+ </div>
+ </div>
+ </div>
+ <p>For responsive &lt;video&gt; elements, you can add the <code>video-responsive</code> class directly.</p>
+ <pre class="code" data-lang="HTML"><code><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"video-responsive video-responsive-4-3"</span>&gt;</span>
+ <span class="hljs-tag">&lt;<span class="hljs-name">iframe</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"..."</span> <span class="hljs-attr">width</span>=<span class="hljs-string">"..."</span> <span class="hljs-attr">height</span>=<span class="hljs-string">"..."</span> <span class="hljs-attr">frameborder</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">allowfullscreen</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">iframe</span>&gt;</span>
+<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
+
+<span class="hljs-tag">&lt;<span class="hljs-name">video</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"video-responsive"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"..."</span>&gt;</span>...<span class="hljs-tag">&lt;/<span class="hljs-name">video</span>&gt;</span>
+</code></pre>
+ <div class="docs-ad docs-ad-sidebar text-center">
+ <script id="_carbonads_js" async="" type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CK7DTKQW&amp;placement=picturepan2githubio"></script>
+ </div>
+ </div>
+ <div class="docs-footer container grid-lg" id="copyright">
+ <p><a href="getting-started.html" target="_blank">Documents</a> · <a href="https://github.com/picturepan2/spectre" target="_blank">GitHub</a> · <a href="https://twitter.com/spectrecss" target="_blank">Twitter</a> · <a href="https://www.paypal.me/picturepan2" target="_blank">PayPal Donate</a> · Version <span class="version"></span></p>
+ <p>Designed and built with <span class="text-error">&hearts;</span> by <a href="https://twitter.com/picturepan2" target="_blank">Yan Zhu</a>. Licensed under the <a href="https://github.com/picturepan2/spectre/blob/master/LICENSE" target="_blank">MIT License</a>.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-2702768-8', 'auto');
+ ga('send', 'pageview');
+ </script>
+ </body>
+</html> \ No newline at end of file