Vue组件:网格系统,row & col

2018-09-27  本文已影响0人  YOJIN
    <g-row class="demoRow" align="center" gutter="20">
        <g-col span="8"><div class="demoCol">hi</div></g-col>
        <g-col span="8"><div class="demoCol">hi</div></g-col>
    </g-row>
    <g-row class="demoRow" align="left" gutter="20">
        <g-col span="6"><div class="demoCol">hi</div></g-col>
        <g-col span="6"><div class="demoCol">hi</div></g-col>
    </g-row>
    <g-row class="demoRow" align="right" gutter="20">
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
    </g-row>
    <g-row class="demoRow" gutter="20">
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
        <g-col span="4"><div class="demoCol">hi</div></g-col>
    </g-row>

需求

1.实现 div 分成各等分(默认最多24分)
2.gutter 缝隙
3.响应各媒体分辨率


知识点


关键点


代码

row.vue
col.vue

上一篇 下一篇

猜你喜欢

热点阅读