123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- .wux-badge {
- position: relative;
- display: inline-block;
- line-height: 1;
- vertical-align: middle
- }
- .wux-badge__count {
- position: absolute;
- transform: translate(50%,-50%);
- top: 0;
- right: 0;
- height: 36rpx;
- border-radius: 18rpx;
- min-width: 36rpx;
- background: #ed3f14;
- color: #fff;
- line-height: 36rpx;
- text-align: center;
- padding: 0 10rpx;
- font-size: 24rpx;
- white-space: nowrap;
- transform-origin: 100% 0;
- z-index: 10;
- box-shadow: 0 0 0 2rpx #fff;
- box-sizing: border-box;
- text-rendering: optimizeLegibility
- }
- .wux-badge__dot {
- width: 16rpx;
- height: 16rpx;
- position: absolute;
- transform: translate(50%,-50%);
- transform-origin: 100% 0;
- top: 0;
- right: 0;
- border-radius: 100%;
- background: #ed3f14;
- z-index: 10;
- box-shadow: 0 0 0 2rpx #fff
- }
- .wux-badge--position-topLeft .wux-badge__count,
- .wux-badge--position-topLeft .wux-badge__dot {
- right: 100%
- }
- .wux-badge--position-bottomRight .wux-badge__count,
- .wux-badge--position-bottomRight .wux-badge__dot {
- top: 100%
- }
- .wux-badge--position-bottomLeft .wux-badge__count,
- .wux-badge--position-bottomLeft .wux-badge__dot {
- top: 100%;
- right: 100%
- }
- .wux-badge--hide-shadow .wux-badge__count,
- .wux-badge--hide-shadow .wux-badge__dot {
- box-shadow: none!important
- }
- .wux-badge__status {
- line-height: inherit;
- vertical-align: baseline
- }
- .wux-badge__status-dot {
- width: 12rpx;
- height: 12rpx;
- display: inline-block;
- border-radius: 50%;
- vertical-align: middle;
- position: relative;
- top: -2rpx
- }
- .wux-badge__status-dot--success {
- background-color: #52c41a
- }
- .wux-badge__status-dot--processing {
- background-color: #1890ff;
- position: relative
- }
- .wux-badge__status-dot--processing::after {
- position: absolute;
- top: -2rpx;
- left: -2rpx;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- border: 2rpx solid #1890ff;
- content: "";
- animation: statusProcessing 1.2s infinite ease-in-out
- }
- .wux-badge__status-dot--default {
- background-color: #d9d9d9
- }
- .wux-badge__status-dot--error {
- background-color: #f5222d
- }
- .wux-badge__status-dot--warning {
- background-color: #faad14
- }
- .wux-badge__status-text {
- display: inline-block;
- color: rgba(0,0,0,.65);
- font-size: 28rpx;
- margin-left: 16rpx
- }
- @keyframes statusProcessing {
- 0% {
- transform: scale(.8);
- opacity: .5
- }
- to {
- transform: scale(2.4);
- opacity: 0
- }
- }
|