Files
xingque/components/kefu-float/kefu-float.wxss
2026-07-09 00:17:03 +08:00

187 lines
3.2 KiB
Plaintext

.kefu-movable-area {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 900;
}
.kefu-movable-view {
width: auto;
height: auto;
pointer-events: auto;
position: absolute;
right: 20rpx;
top: 0;
}
.kefu-wrap {
display: flex;
flex-direction: column;
align-items: flex-end;
pointer-events: auto;
}
.kefu-float {
position: relative;
}
.kefu-float--full {
display: flex;
align-items: stretch;
background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
border-radius: 999rpx;
box-shadow: 0 8rpx 28rpx rgba(7, 193, 96, 0.45);
border: 2rpx solid rgba(255, 255, 255, 0.85);
overflow: visible;
animation: kefu-pulse 2.4s ease-in-out infinite;
}
@keyframes kefu-pulse {
0%, 100% { box-shadow: 0 8rpx 28rpx rgba(7, 193, 96, 0.45); }
50% { box-shadow: 0 8rpx 36rpx rgba(7, 193, 96, 0.65), 0 0 0 8rpx rgba(7, 193, 96, 0.12); }
}
.kefu-unread-badge {
position: absolute;
top: -10rpx;
right: -6rpx;
min-width: 36rpx;
height: 36rpx;
line-height: 36rpx;
padding: 0 8rpx;
background: #fa5151;
color: #fff;
font-size: 20rpx;
font-weight: 700;
text-align: center;
border-radius: 18rpx;
border: 3rpx solid #fff;
z-index: 2;
}
.kefu-unread-badge--mini {
top: -6rpx;
right: -4rpx;
}
.kefu-float-main {
display: flex;
align-items: center;
padding: 18rpx 24rpx;
flex: 1;
}
.kefu-float-main:active {
opacity: 0.88;
}
.kefu-float-icon-img {
width: 44rpx;
height: 44rpx;
margin-right: 12rpx;
flex-shrink: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.95);
padding: 4rpx;
}
.kefu-text-col {
display: flex;
flex-direction: column;
min-width: 0;
}
.kefu-float-text {
font-size: 28rpx;
color: #fff;
font-weight: 700;
white-space: nowrap;
}
.kefu-float-sub {
font-size: 20rpx;
color: rgba(255, 255, 255, 0.92);
margin-top: 2rpx;
font-weight: 600;
}
.kefu-float-sub--online {
color: #e8ffe8;
}
.kefu-float-sub--warn {
color: #fff3e0;
}
.kefu-float-close {
width: 52rpx;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.12);
color: rgba(255, 255, 255, 0.9);
font-size: 34rpx;
line-height: 1;
border-left: 1rpx solid rgba(255, 255, 255, 0.25);
border-radius: 0 999rpx 999rpx 0;
}
.kefu-float-close:active {
background: rgba(0, 0, 0, 0.2);
}
.kefu-permanent-row {
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 6rpx;
padding: 4rpx 10rpx;
}
.kefu-permanent-row:active {
opacity: 0.75;
}
.kefu-permanent-row--mini {
margin-top: 4rpx;
padding: 2rpx 8rpx;
}
.kefu-permanent-label {
font-size: 20rpx;
color: #888;
}
.kefu-wrap--mini {
align-items: flex-end;
}
.kefu-float--mini {
width: 96rpx;
height: 96rpx;
padding: 0;
border-radius: 50%;
background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
box-shadow: 0 8rpx 24rpx rgba(7, 193, 96, 0.45);
border: 3rpx solid #fff;
display: flex;
align-items: center;
justify-content: center;
animation: kefu-pulse 2.4s ease-in-out infinite;
}
.kefu-float--mini:active {
transform: scale(0.96);
}
.kefu-float-mini-icon-img {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.95);
padding: 4rpx;
}