2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 0
|
2016-05-26 17:46:55 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 典型卡片
|
|
|
|
en-US: Basic card
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-02-19 19:35:49 +08:00
|
|
|
|
2016-05-26 17:46:55 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-02-19 19:35:49 +08:00
|
|
|
包含标题、内容、操作区域。
|
|
|
|
|
2016-05-26 17:46:55 +08:00
|
|
|
## en-US
|
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
A basic card containing a title, content and an extra corner content. Supports two sizes: `default` and `small`.
|
2016-05-26 17:46:55 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2016-02-19 19:35:49 +08:00
|
|
|
import { Card } from 'antd';
|
2022-05-23 14:37:16 +08:00
|
|
|
import React from 'react';
|
2016-02-19 19:35:49 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-06-05 20:11:25 +08:00
|
|
|
<>
|
2019-05-07 14:57:32 +08:00
|
|
|
<Card title="Default size card" extra={<a href="#">More</a>} style={{ width: 300 }}>
|
2018-11-18 05:35:56 +08:00
|
|
|
<p>Card content</p>
|
|
|
|
<p>Card content</p>
|
|
|
|
<p>Card content</p>
|
|
|
|
</Card>
|
2019-05-07 14:57:32 +08:00
|
|
|
<Card size="small" title="Small size card" extra={<a href="#">More</a>} style={{ width: 300 }}>
|
2018-11-18 05:35:56 +08:00
|
|
|
<p>Card content</p>
|
|
|
|
<p>Card content</p>
|
|
|
|
<p>Card content</p>
|
|
|
|
</Card>
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2018-11-18 05:35:56 +08:00
|
|
|
```
|
2017-09-22 18:33:29 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.code-box-demo p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2018-11-18 05:35:56 +08:00
|
|
|
#components-card-demo-basic .ant-card { margin-bottom: 30px; }
|
2017-09-22 18:33:29 +08:00
|
|
|
</style>
|