Grid 网格
24格网格
TIP
页面需设置 CSS样式
*{box-sizing: border-box;}
预览
代码
<g-row class="demoRow">
<g-col span="12"><div class="demoCol">12</div></g-col>
<g-col span="12"><div class="demoCol">12</div></g-col>
</g-row>
<g-row class="demoRow">
<g-col span="8"><div class="demoCol">8</div></g-col>
<g-col span="8"><div class="demoCol">8</div></g-col>
<g-col span="8"><div class="demoCol">8</div></g-col>
</g-row>
<g-row class="demoRow">
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
</g-row>
设置 gutter
预览
代码
<g-row class="demoRow" gutter="10">
<g-col span="8"><div class="demoCol">8</div></g-col>
<g-col span="8"><div class="demoCol">8</div></g-col>
<g-col span="8"><div class="demoCol">8</div></g-col>
</g-row>
<g-row class="demoRow" gutter="10">
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
</g-row>
设置空隙
预览
代码
<g-row class="demoRow" gutter="10">
<g-col span="8"><div class="demoCol">8</div></g-col>
<g-col span="2" offset="4"><div class="demoCol">8</div></g-col>
<g-col span="8" offset="2"><div class="demoCol">8</div></g-col>
</g-row>
<g-row class="demoRow" gutter="10">
<g-col span="4" offset="2"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
<g-col span="6"><div class="demoCol">6</div></g-col>
</g-row>
<g-row class="demoRow" gutter="10">
<g-col span="12"><div class="demoCol">12</div></g-col>
<g-col span="9" offset="3"><div class="demoCol">12</div></g-col>
</g-row>