mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-11 13:59:11 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
41 lines
804 B
Markdown
41 lines
804 B
Markdown
---
|
|
order: 0
|
|
title:
|
|
zh-CN: 典型卡片
|
|
en-US: Basic card
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
包含标题、内容、操作区域。
|
|
|
|
## en-US
|
|
|
|
A basic card containing a title, content and an extra corner content. Supports two sizes: `default` and `small`.
|
|
|
|
```jsx
|
|
import { Card } from 'antd';
|
|
|
|
export default () => (
|
|
<>
|
|
<Card title="Default size card" extra={<a href="#">More</a>} style={{ width: 300 }}>
|
|
<p>Card content</p>
|
|
<p>Card content</p>
|
|
<p>Card content</p>
|
|
</Card>
|
|
<Card size="small" title="Small size card" extra={<a href="#">More</a>} style={{ width: 300 }}>
|
|
<p>Card content</p>
|
|
<p>Card content</p>
|
|
<p>Card content</p>
|
|
</Card>
|
|
</>
|
|
);
|
|
```
|
|
|
|
<style>
|
|
.code-box-demo p {
|
|
margin: 0;
|
|
}
|
|
#components-card-demo-basic .ant-card { margin-bottom: 30px; }
|
|
</style>
|