ant-design/components/grid/demo/basic.md

47 lines
951 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 0
title:
2016-11-05 15:46:50 +08:00
zh-CN: 基础栅格
en-US: Basic Grid
2016-03-31 09:40:55 +08:00
---
2015-06-09 18:22:52 +08:00
## zh-CN
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
## en-US
From the stack to the horizontal arrangement.
You can create a basic grid system by using a single set of `Row` and `Col` grid assembly, all of the columns (Col) must be placed in `Row`.
2019-05-07 14:57:32 +08:00
```jsx
import { Row, Col } from 'antd';
2015-10-27 23:52:17 +08:00
ReactDOM.render(
<div>
<Row>
<Col span={24}>col</Col>
</Row>
2015-10-27 23:52:17 +08:00
<Row>
<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>
<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>
<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>,
2019-05-07 14:57:32 +08:00
mountNode,
2015-10-27 23:52:17 +08:00
);
2019-05-07 14:57:32 +08:00
```