2016-03-31 09:40:55 +08:00
|
|
|
|
---
|
|
|
|
|
order: 0
|
2016-08-08 10:40:02 +08:00
|
|
|
|
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
|
|
|
|
|
2016-08-08 10:40:02 +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
|
|
|
|
|
2016-08-08 10:40:02 +08:00
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
|
|
From the stack to the horizontal arrangement.
|
|
|
|
|
|
2018-01-23 16:33:07 +08:00
|
|
|
|
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`.
|
2016-08-08 10:40:02 +08:00
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
|
```tsx
|
2022-05-23 14:37:16 +08:00
|
|
|
|
import { Col, Row } from 'antd';
|
2022-05-19 09:46:26 +08:00
|
|
|
|
import React from 'react';
|
2015-10-27 23:52:17 +08:00
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
|
const App: React.FC = () => (
|
2020-02-26 21:00:43 +08:00
|
|
|
|
<>
|
2019-11-20 11:13:24 +08:00
|
|
|
|
<Row>
|
2019-11-29 22:02:35 +08:00
|
|
|
|
<Col span={24}>col</Col>
|
2019-11-20 11:13:24 +08:00
|
|
|
|
</Row>
|
2015-10-27 23:52:17 +08:00
|
|
|
|
<Row>
|
2016-09-30 14:24:41 +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-09-30 14:24:41 +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-09-30 14:24:41 +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>
|
2022-04-03 23:27:45 +08:00
|
|
|
|
</>
|
2015-10-27 23:52:17 +08:00
|
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
|
```
|