2
0
mirror of https://github.com/tusen-ai/naive-ui.git synced 2025-01-12 12:25:16 +08:00
naive-ui/demo/documentation/components/grid/zhCN/gutter.md

43 lines
749 B
Markdown
Raw Normal View History

2020-01-02 22:40:12 +08:00
# 间隔
2020-02-03 20:27:04 +08:00
设定水平、垂直间隔。
2020-01-02 22:40:12 +08:00
```html
<n-row :gutter="[12, 8]">
<n-col :span="6">
<div class="red"></div>
</n-col>
<n-col :span="6">
<div class="green"></div>
</n-col>
<n-col :span="6">
<div class="red"></div>
</n-col>
<n-col :span="6">
<div class="green"></div>
</n-col>
</n-row>
<n-row :gutter="[12, 8]">
<n-col :span="6">
<div class="red"></div>
</n-col>
<n-col :span="6">
<div class="green"></div>
</n-col>
<n-col :span="6">
<div class="red"></div>
</n-col>
<n-col :span="6">
<div class="green"></div>
</n-col>
</n-row>
```
```css
.red {
height: 108px;
background-color: rgba(128, 0, 0, .5);
}
.green {
height: 108px;
background-color: rgba(0, 128, 0, .5);
}
```