naive-ui/demo/documentation/components/grid/zhCN/gutter.md
2020-05-30 19:40:31 +08:00

790 B

间隔

设定水平、垂直间隔。

<n-row :gutter="[12, 8]">
  <n-col :span="6">
    <div class="light-green"></div>
  </n-col>
  <n-col :span="6">
    <div class="green"></div>
  </n-col>
  <n-col :span="6">
    <div class="light-green"></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="light-green"></div>
  </n-col>
  <n-col :span="6">
    <div class="green"></div>
  </n-col>
  <n-col :span="6">
    <div class="light-green"></div>
  </n-col>
  <n-col :span="6">
    <div class="green"></div>
  </n-col>
</n-row>
.light-green {
  height: 108px;
  background-color: rgba(0, 128, 0, .12);
}
.green {
  height: 108px;
  background-color: rgba(0, 128, 0, .24);
}