2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 3
|
|
|
|
title: 栅格卡片
|
|
|
|
---
|
2016-02-20 16:40:18 +08:00
|
|
|
|
|
|
|
在系统概览页面常常和栅格进行配合。
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Card, Col, Row } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Row>
|
|
|
|
<Col span="8">
|
|
|
|
<Card title="卡片标题">卡片的内容</Card>
|
|
|
|
</Col>
|
|
|
|
<Col span="8">
|
|
|
|
<Card title="卡片标题">卡片的内容</Card>
|
|
|
|
</Col>
|
|
|
|
<Col span="8">
|
|
|
|
<Card title="卡片标题">卡片的内容</Card>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
, mountNode);
|
|
|
|
````
|
|
|
|
|
|
|
|
````css
|
|
|
|
/* 增加 16px 栅格间距 */
|
2016-03-11 09:45:06 +08:00
|
|
|
.code-box-demo .row {
|
2016-02-20 16:40:18 +08:00
|
|
|
margin-left: -8px;
|
|
|
|
margin-right: -8px;
|
|
|
|
}
|
2016-03-11 09:45:06 +08:00
|
|
|
.code-box-demo .row > div {
|
2016-02-20 16:40:18 +08:00
|
|
|
padding: 0 8px;
|
|
|
|
}
|
|
|
|
````
|