Foundation Grid - Horizontal Stacking
The following example creates a basic grid system. On PC and tablet devices it is horizontally laid out, while on small devices such as phones it is horizontally stacked.
Example
<
div
class=
"row"
<
div
class="medium-6 columns"
style=
"background-color:yellow;"
<
p
Runoob Tutorial
<
/p
<
/div
<
div
class="medium-6 columns"
style=
"background-color:pink;"
<
p
Runoob Tutorial
<
/p
<
/div
<
/divTry it »
|
| Tip: .small\|medium\|large-* The number in the class specifies the number of columns to span. So, .small-1 spans 1 column, .small-4 spans 4 columns, .small-6 spans 6 columns (50% width), etc.
**注意:** 要保证数列加起来是 12 列! |
| --- | --- |