.wux-badge { position: relative; display: inline-block; line-height: 1; vertical-align: middle } .wux-badge__count { position: absolute; transform: translateX(50%); top: 0; right: 0; height: 32rpx; border-radius: 24rpx; /* min-width: 32rpx; */ min-width: 16rpx; background: #ed3f14; border: 2rpx solid transparent; color: #fff; /* line-height: 32rpx; */ line-height: 1; text-align: center; /* padding: 0rpx 8rpx; */ padding: .1em .4em; font-size: 24rpx; white-space: nowrap; transform-origin: -10% center; z-index: 10; box-shadow: 0 0 0 2rpx #fff; box-sizing: border-box; text-rendering: optimizeLegibility } .wux-badge__dot { position: absolute; transform: translateX(-50%); transform-origin: 0 center; top: -8rpx; right: -16rpx; height: 16rpx; width: 16rpx; border-radius: 100%; background: #ed3f14; z-index: 10; box-shadow: 0 0 0 2rpx #fff } .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: 0; left: 0; 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 } }