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

46 lines
862 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
2016-04-10 15:38:52 +08:00
order: 4
title:
zh-CN: 栅格卡片
en-US: Grid card
2016-03-31 09:40:55 +08:00
---
2016-02-20 16:40:18 +08:00
## zh-CN
2016-02-20 16:40:18 +08:00
在系统概览页面常常和栅格进行配合。
## en-US
Cards usually cooperate with grid layout in overview page.
2017-01-19 15:19:03 +08:00
````__react
2016-02-20 16:40:18 +08:00
import { Card, Col, Row } from 'antd';
ReactDOM.render(
2016-04-10 15:38:52 +08:00
<div style={{ background: '#ECECEC', padding: '30px' }}>
<Row>
<Col span="8">
<Card title="Card title" bordered={false}>Card content</Card>
2016-04-10 15:38:52 +08:00
</Col>
<Col span="8">
<Card title="Card title" bordered={false}>Card content</Card>
2016-04-10 15:38:52 +08:00
</Col>
<Col span="8">
<Card title="Card title" bordered={false}>Card content</Card>
2016-04-10 15:38:52 +08:00
</Col>
</Row>
</div>
2016-02-20 16:40:18 +08:00
, mountNode);
````
````css
/* Increase grid spacing of 16px */
2016-06-06 11:40:54 +08:00
.code-box-demo .ant-row {
2016-02-20 16:40:18 +08:00
margin-left: -8px;
margin-right: -8px;
}
2016-06-06 11:40:54 +08:00
.code-box-demo .ant-row > div {
2016-02-20 16:40:18 +08:00
padding: 0 8px;
}
````