@nutui/nutui-react-taro
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
112 lines • 1.91 kB
CSS
/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-badge {
position: relative;
display: inline-flex;
vertical-align: middle;
box-sizing: content-box;
width: auto;
}
.nut-badge-icon {
display: flex;
justify-content: center;
align-items: center;
background: #ff0f23;
padding: 2px;
text-align: center;
z-index: 1;
}
.nut-badge-icon .nut-icon {
width: 10px;
height: 10px;
font-size: 10px;
}
.nut-badge-sup {
border-radius: 14px;
}
.nut-badge-icon {
border-radius: 14px;
}
.nut-badge-sup::after {
content: "";
position: absolute;
top: -50%;
bottom: -50%;
left: -50%;
right: -50%;
transform: scale(0.5);
border: 1px solid #ffffff;
border-radius: 14px;
}
.nut-badge-icon::after {
content: "";
position: absolute;
top: -50%;
bottom: -50%;
left: -50%;
right: -50%;
transform: scale(0.5);
border: 1px solid #ffffff;
border-radius: 14px;
}
.nut-badge-sup {
display: inline-flex;
text-align: center;
min-width: 6px;
padding: 1px 4px;
box-sizing: border-box;
color: #ffffff;
font-size: 9px;
line-height: 12px;
white-space: nowrap;
font-weight: normal;
vertical-align: middle;
background: #ff0f23;
z-index: 1;
}
.nut-badge-disabled {
background: #c2c4cc;
}
.nut-badge-number {
font-family: "JD";
}
.nut-badge-one {
height: 14px;
width: 14px;
}
.nut-badge-content {
position: absolute;
transform: translate(50%, -50%);
}
.nut-badge-dot {
padding: 0;
border-radius: 50%;
}
.nut-badge-dot::after {
border: 1px solid #ffffff;
border-radius: 50%;
}
.nut-badge-dot-normal {
min-width: 6px;
width: 6px;
height: 6px;
}
.nut-badge-dot-small {
min-width: 4px;
width: 4px;
height: 4px;
}
.nut-badge-dot-large {
min-width: 8px;
width: 8px;
height: 8px;
}
.nut-badge-outline {
background: #ffffff;
color: #ff0f23;
}
.nut-badge-outline::after {
border: 1px solid #ff0f23;
}