mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-26 09:58:33 +08:00
31 lines
372 B
Markdown
31 lines
372 B
Markdown
# 基本
|
|
|
|
- order: 0
|
|
|
|
简单的徽章展示。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { Badge } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<Badge count={5}>
|
|
<a href="#" className="head-example"></a>
|
|
</Badge>
|
|
, mountNode);
|
|
````
|
|
|
|
````css
|
|
.ant-badge {
|
|
margin-right: 16px;
|
|
}
|
|
.head-example {
|
|
width: 42px;
|
|
height: 42px;
|
|
border-radius: 6px;
|
|
background: #eee;
|
|
display: inline-block;
|
|
}
|
|
````
|