You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.0 KiB
49 lines
1.0 KiB
9 years ago
|
---
|
||
|
order: 1
|
||
8 years ago
|
title:
|
||
8 years ago
|
zh-CN: 区块间隔
|
||
8 years ago
|
en-US: Grid Gutter
|
||
9 years ago
|
---
|
||
9 years ago
|
|
||
8 years ago
|
## zh-CN
|
||
|
|
||
9 years ago
|
栅格常常需要和间隔进行配合,你可以使用 `Row` 的 `gutter` 属性,我们推荐使用 `(16+8n)px` 作为栅格间隔。
|
||
9 years ago
|
|
||
8 years ago
|
## en-US
|
||
|
|
||
8 years ago
|
You can use the `gutter` property of `Row` as grid spacing, we recommend set it to `(16 + 8n) px`.
|
||
8 years ago
|
|
||
9 years ago
|
````jsx
|
||
|
import { Row, Col } from 'antd';
|
||
|
|
||
|
ReactDOM.render(
|
||
|
<div className="gutter-example">
|
||
|
<Row gutter={16}>
|
||
9 years ago
|
<Col className="gutter-row" span={6}>
|
||
8 years ago
|
<div className="gutter-box">col-6</div>
|
||
9 years ago
|
</Col>
|
||
9 years ago
|
<Col className="gutter-row" span={6}>
|
||
8 years ago
|
<div className="gutter-box">col-6</div>
|
||
9 years ago
|
</Col>
|
||
9 years ago
|
<Col className="gutter-row" span={6}>
|
||
8 years ago
|
<div className="gutter-box">col-6</div>
|
||
9 years ago
|
</Col>
|
||
9 years ago
|
<Col className="gutter-row" span={6}>
|
||
8 years ago
|
<div className="gutter-box">col-6</div>
|
||
9 years ago
|
</Col>
|
||
|
</Row>
|
||
|
</div>
|
||
|
, mountNode);
|
||
|
````
|
||
|
|
||
|
````css
|
||
9 years ago
|
.gutter-example .ant-row > div {
|
||
9 years ago
|
background: transparent;
|
||
|
border: 0;
|
||
|
}
|
||
|
.gutter-box {
|
||
8 years ago
|
background: #00A0E9;
|
||
8 years ago
|
padding: 5px 0;
|
||
9 years ago
|
}
|
||
|
````
|