2019-10-09 17:38:08 +08:00
|
|
|
# Custom content
|
|
|
|
```html
|
|
|
|
<n-badge value="new">
|
2019-10-09 18:11:54 +08:00
|
|
|
<div class="block" />
|
2019-10-09 17:38:08 +08:00
|
|
|
</n-badge>
|
|
|
|
<n-badge value="hot">
|
2019-10-09 18:11:54 +08:00
|
|
|
<div class="block" />
|
2019-10-09 17:38:08 +08:00
|
|
|
</n-badge>
|
|
|
|
```
|
|
|
|
```css
|
|
|
|
.n-badge {
|
|
|
|
margin: 0 32px 8px 0;
|
|
|
|
}
|
2019-10-09 18:11:54 +08:00
|
|
|
.block {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
background-color: #dddddd;
|
|
|
|
border-radius: 4px;
|
|
|
|
transition: background-color .3s cubic-bezier(.4, 0, .2, 1);
|
|
|
|
}
|
|
|
|
.n-dark-theme .block {
|
|
|
|
background-color: rgba(255, 255, 255, .15);
|
|
|
|
}
|
2019-10-09 17:38:08 +08:00
|
|
|
```
|