mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 03:14:07 +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
70 lines
1.6 KiB
Markdown
70 lines
1.6 KiB
Markdown
---
|
|
order: 10
|
|
title:
|
|
zh-CN: 缎带
|
|
en-US: Ribbon
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
使用缎带型的徽标。
|
|
|
|
## en-US
|
|
|
|
Use ribbon badge.
|
|
|
|
```jsx
|
|
import { Badge, Card } from 'antd';
|
|
|
|
export default () => (
|
|
<>
|
|
<Badge.Ribbon text="Hippies">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="pink">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="red">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="cyan">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="green">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="purple">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="volcano">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
<Badge.Ribbon text="Hippies" color="magenta">
|
|
<Card title="Pushes open the window" size="small">
|
|
and raises the spyglass.
|
|
</Card>
|
|
</Badge.Ribbon>
|
|
</>
|
|
);
|
|
```
|
|
|
|
```css
|
|
.ant-card {
|
|
margin-bottom: 16px;
|
|
}
|
|
```
|