naive-ui/demo/documentation/components/grid/enUS/pushPull.md
2020-01-27 18:03:03 +08:00

537 B

Push && Pull

See codes to know what happens. Basically it is relative position change.

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