Summary Files Commits Branches @commit @diff @stats
path: root / index.html
diff options
context:
space:
mode:
Commit8c80ec8f50827cddc2a787b82c38503497647781 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2016-04-21 19:28:00 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2016-04-21 19:28:00 +0800
Files4c2294ed1170ad8d227c881f0168e737b7389137 /index.html
Spectre-Dark-Gruvbox-8c80ec8f50827cddc2a787b82c38503497647781.tar
Spectre-Dark-Gruvbox-8c80ec8f50827cddc2a787b82c38503497647781.tar.gz
Spectre-Dark-Gruvbox-8c80ec8f50827cddc2a787b82c38503497647781.zip
Parent1a75ab13d578284a795c1c05e6914a53bacc8a93 (diff)
add more flexible responsive grid
1 files changed, 57 insertions, 17 deletions
-rw-r--r--index.html74
diff --git a/index.html b/index.html
index cec8020..b5baad9 100644
--- a/index.html
+++ b/index.html
@@ -299,20 +299,7 @@
<div class="bg-grey"></div>
</div>
</div>
- <div class="columns">
- <div class="column col-6">
- <div class="bg-grey">col-6</div>
- </div>
- <div class="column col-3">
- <div class="bg-grey">col-3</div>
- </div>
- <div class="column col-2">
- <div class="bg-grey">col-2</div>
- </div>
- <div class="column col-1">
- <div class="bg-grey">col-1</div>
- </div>
- </div>
+
<div class="columns">
<div class="column col-12">
<div class="bg-grey">col-12 (100%)</div>
@@ -333,12 +320,10 @@
<div class="bg-grey">col-3 (25%)</div>
</div>
</div>
+
<section class="notes">
<p>Add the class <code>columns</code> to a container. And add any element you want with classname <code>column</code> inside the container. These columns will take up the space equally. You can specific the width of each column by adding class <code>col-[1-12]</code>.</p>
</section>
- <section class="notes">
- <p>When the width of browser viewport is less than 840px and more than 480px, the col-[1-11] will be 50% width to the parent elements.</p>
- </section>
<!-- layout example -->
<pre class="code lang-html">
@@ -350,6 +335,61 @@
&lt;<span class="tag">/div</span>&gt;
</pre>
+ <div class="columns">
+ <div class="column col-md-6">
+ <div class="bg-grey">col-md-6</div>
+ </div>
+ <div class="column col-md-3">
+ <div class="bg-grey">col-md-3</div>
+ </div>
+ <div class="column col-md-3">
+ <div class="bg-grey">col-md-3</div>
+ </div>
+ </div>
+
+ <div class="columns">
+ <div class="column col-sm-6">
+ <div class="bg-grey">col-sm-6</div>
+ </div>
+ <div class="column col-sm-3">
+ <div class="bg-grey">col-sm-3</div>
+ </div>
+ <div class="column col-sm-3">
+ <div class="bg-grey">col-sm-3</div>
+ </div>
+ </div>
+
+ <div class="columns">
+ <div class="column col-xs-6">
+ <div class="bg-grey">col-xs-6</div>
+ </div>
+ <div class="column col-xs-3">
+ <div class="bg-grey">col-xs-3</div>
+ </div>
+ <div class="column col-xs-3">
+ <div class="bg-grey">col-xs-3</div>
+ </div>
+ </div>
+
+ <section class="notes">
+ <p>Spectre also provides a neat responsive layout grid system. There are <code>.col-xs-[1-12]</code>, <code>.col-sm-[1-12]</code> and <code>.col-md-[1-12]</code> available for flexible grid across mobile, tablet and desktop viewport usage.</p>
+ <ul>
+ <li>For window width less than <strong>480px</strong>, all columns will show as a single row.</li>
+ <li><code>col-xs-[1-12]</code> apply to window width greater than or equal to <strong>481px</strong>. </li>
+ <li><code>col-sm-[1-12]</code> apply to window width greater than or equal to <strong>601px</strong>. </li>
+ <li><code>col-md-[1-12]</code> apply to window width greater than or equal to <strong>841px</strong>. </li>
+ </ul>
+ </section>
+
+ <!-- layout example -->
+<pre class="code lang-html">
+&lt;<span class="tag">div</span> <span class="atn">class</span>=<span class="atv">&quot;columns&quot;</span>&gt;
+ &lt;<span class="tag">div</span> <span class="atn">class</span>=<span class="atv">&quot;column col-xs-6&quot;</span>&gt;col-xs-6&lt;<span class="tag">/div</span>&gt;
+ &lt;<span class="tag">div</span> <span class="atn">class</span>=<span class="atv">&quot;column col-xs-3&quot;</span>&gt;col-xs-3&lt;<span class="tag">/div</span>&gt;
+ &lt;<span class="tag">div</span> <span class="atn">class</span>=<span class="atv">&quot;column col-xs-3&quot;</span>&gt;col-xs-3&lt;<span class="tag">/div</span>&gt;
+&lt;<span class="tag">/div</span>&gt;
+</pre>
+
</section>
<section id="tables" class="grid-960">