naive-ui/demo/documentation/components/grid/zhCN/pushPull.md

28 lines
571 B
Markdown
Raw Normal View History

2020-02-03 20:27:04 +08:00
# 推 & 拉
看看代码就明白这个怎么用了,基本来说就是相对位置的改变。
2020-01-02 22:40:12 +08:00
```html
<n-row :gutter="12">
<n-col :span="6" :push="6">
2020-05-30 19:40:31 +08:00
<div class="light-green"></div>
2020-01-02 22:40:12 +08:00
</n-col>
<n-col :span="6" :pull="6">
<div class="green"></div>
</n-col>
<n-col :span="6">
2020-05-30 19:40:31 +08:00
<div class="light-green"></div>
2020-01-02 22:40:12 +08:00
</n-col>
<n-col :span="6">
<div class="green"></div>
</n-col>
</n-row>
```
```css
2020-05-30 19:40:31 +08:00
.light-green {
2020-01-02 22:40:12 +08:00
height: 108px;
2020-05-30 19:40:31 +08:00
background-color: rgba(0, 128, 0, .12);
2020-01-02 22:40:12 +08:00
}
.green {
height: 108px;
2020-05-30 19:40:31 +08:00
background-color: rgba(0, 128, 0, .24);
2020-01-02 22:40:12 +08:00
}
2020-05-30 19:40:31 +08:00
```