2016-03-31 09:40:55 +08:00
|
|
|
|
---
|
|
|
|
|
order: 0
|
|
|
|
|
title: 基础布局
|
|
|
|
|
---
|
2015-06-09 18:22:52 +08:00
|
|
|
|
|
2015-06-15 17:46:42 +08:00
|
|
|
|
从堆叠到水平排列。
|
2015-06-09 18:22:52 +08:00
|
|
|
|
|
2016-02-23 17:34:46 +08:00
|
|
|
|
使用单一的一组 `Row` 和 `Col` 栅格组件,就可以创建一个基本的栅格系统,所有列(Col)必须放在 `Row` 内。
|
2015-06-09 18:22:52 +08:00
|
|
|
|
|
2015-10-27 23:52:17 +08:00
|
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
|
import { Row, Col } from 'antd';
|
2015-10-27 23:52:17 +08:00
|
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
|
<div>
|
|
|
|
|
<Row>
|
2016-02-25 15:53:28 +08:00
|
|
|
|
<Col span={12}>.col-12</Col>
|
|
|
|
|
<Col span={12}>.col-12</Col>
|
2015-10-27 23:52:17 +08:00
|
|
|
|
</Row>
|
2016-02-23 17:34:46 +08:00
|
|
|
|
<Row>
|
2016-02-25 15:53:28 +08:00
|
|
|
|
<Col span={8}>.col-8</Col>
|
|
|
|
|
<Col span={8}>.col-8</Col>
|
|
|
|
|
<Col span={8}>.col-8</Col>
|
2015-10-27 23:52:17 +08:00
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
2016-02-25 15:53:28 +08:00
|
|
|
|
<Col span={6}>.col-6</Col>
|
|
|
|
|
<Col span={6}>.col-6</Col>
|
|
|
|
|
<Col span={6}>.col-6</Col>
|
|
|
|
|
<Col span={6}>.col-6</Col>
|
2015-10-27 23:52:17 +08:00
|
|
|
|
</Row>
|
|
|
|
|
</div>,
|
2015-12-29 12:08:58 +08:00
|
|
|
|
mountNode
|
2015-10-27 23:52:17 +08:00
|
|
|
|
);
|
2015-10-28 18:04:56 +08:00
|
|
|
|
````
|