2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 1
|
2016-09-30 14:24:41 +08:00
|
|
|
title:
|
2016-08-08 10:40:02 +08:00
|
|
|
zh-CN: 区块间隔
|
2016-09-30 14:24:41 +08:00
|
|
|
en-US: Grid Gutter
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-02-23 17:34:46 +08:00
|
|
|
|
2016-08-08 10:40:02 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-02-25 16:48:03 +08:00
|
|
|
栅格常常需要和间隔进行配合,你可以使用 `Row` 的 `gutter` 属性,我们推荐使用 `(16+8n)px` 作为栅格间隔。
|
2016-02-23 17:34:46 +08:00
|
|
|
|
2016-08-08 10:40:02 +08:00
|
|
|
## en-US
|
|
|
|
|
2016-09-30 14:24:41 +08:00
|
|
|
You can use the `gutter` property of `Row` as grid spacing, we recommend set it to `(16 + 8n) px`.
|
2016-08-08 10:40:02 +08:00
|
|
|
|
2016-02-23 17:34:46 +08:00
|
|
|
````jsx
|
|
|
|
import { Row, Col } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div className="gutter-example">
|
|
|
|
<Row gutter={16}>
|
2016-03-10 09:41:51 +08:00
|
|
|
<Col className="gutter-row" span={6}>
|
2016-09-30 14:24:41 +08:00
|
|
|
<div className="gutter-box">col-6</div>
|
2016-02-23 17:34:46 +08:00
|
|
|
</Col>
|
2016-03-10 09:41:51 +08:00
|
|
|
<Col className="gutter-row" span={6}>
|
2016-09-30 14:24:41 +08:00
|
|
|
<div className="gutter-box">col-6</div>
|
2016-02-23 17:34:46 +08:00
|
|
|
</Col>
|
2016-03-10 09:41:51 +08:00
|
|
|
<Col className="gutter-row" span={6}>
|
2016-09-30 14:24:41 +08:00
|
|
|
<div className="gutter-box">col-6</div>
|
2016-02-23 17:34:46 +08:00
|
|
|
</Col>
|
2016-03-10 09:41:51 +08:00
|
|
|
<Col className="gutter-row" span={6}>
|
2016-09-30 14:24:41 +08:00
|
|
|
<div className="gutter-box">col-6</div>
|
2016-02-23 17:34:46 +08:00
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</div>
|
|
|
|
, mountNode);
|
|
|
|
````
|
|
|
|
|
|
|
|
````css
|
2016-06-06 11:40:54 +08:00
|
|
|
.gutter-example .ant-row > div {
|
2016-02-23 17:34:46 +08:00
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
.gutter-box {
|
2016-09-30 14:24:41 +08:00
|
|
|
background: #00A0E9;
|
2016-10-10 20:56:17 +08:00
|
|
|
padding: 5px 0;
|
2016-02-23 17:34:46 +08:00
|
|
|
}
|
|
|
|
````
|