.knn-float-right {
position: fixed;
bottom: 60px;
right: 20px;
z-index: 1030;
text-align: center;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.knn-float-right.position-center {
bottom: auto;
top: 50%;
transform: translateY(-50%);
} body.knn-scroll-ing .knn-float-right.scrolling-hide,
body.knn-scroll-down .knn-float-right.scroll-down-hide {
transform: translateX(180%);
}
body.knn-scroll-ing .knn-float-right.scrolling-hide.position-center,
body.knn-scroll-down .knn-float-right.scroll-down-hide.position-center {
transform: translate(180%, -50%);
} .knn-float-right .float-btn {
width: 40px;
min-height: 32px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 4px 0;
font-size: 18px;
cursor: pointer;
position: relative;
text-decoration: none;
--this-color: #555;
--this-bg: var(--knn-bg-color-card, #fff);
background: var(--this-bg);
color: var(--this-color) !important;
box-shadow: 0 0 6px 0 rgba(76, 86, 114, 0.12);
transition: color 0.3s;
}
.knn-float-right .float-btn:hover {
color: var(--knn-color-primary, #007aff) !important;
}
.knn-float-right .float-btn svg {
width: 1em;
height: 1em;
fill: currentColor;
} .knn-float-right .float-btn.float-btn-vip {
width: 40px;
min-height: 0;
padding: 0;
background: transparent;
box-shadow: none;
border: 0;
border-radius: 0;
overflow: visible;
}
.knn-float-right .float-btn.float-btn-vip .knn-vip-img {
display: block;
width: 40px;
height: auto;
transform-origin: center center;
animation: knn-vip-swing 2.5s linear 0.15s infinite;
}
@keyframes knn-vip-swing {
10% {
transform: rotate(15deg);
}
20% {
transform: rotate(-10deg);
}
30% {
transform: rotate(5deg);
}
40% {
transform: rotate(-5deg);
}
50%,
100% {
transform: rotate(0deg);
}
} .knn-float-right.round .float-btn {
margin-top: 10px;
border-radius: 4px;
}
.knn-float-right.round .float-btn:first-child {
margin-top: 0;
} .knn-float-right.square .float-btn + .float-btn,
.knn-float-right.square .hover-show + .float-btn,
.knn-float-right.square .float-btn + .hover-show {
border-top: 1px solid var(--knn-border-color, rgba(0, 0, 0, 0.06));
}
.knn-float-right.square .float-btn:hover {
z-index: 2;
}
.knn-float-right.square .float-btn:first-child {
border-radius: 4px 4px 0 0;
}
.knn-float-right.square .float-btn:last-child {
border-radius: 0 0 4px 4px;
}
.knn-float-right.square .float-btn:only-child {
border-radius: 4px;
} .knn-float-right.filter .float-btn {
--this-bg: rgba(255, 255, 255, 0.72);
-webkit-backdrop-filter: saturate(1.6) blur(12px);
backdrop-filter: saturate(1.6) blur(12px);
} .float-btn-badge {
position: absolute;
top: -3px;
right: -5px;
min-width: 17px;
height: 17px;
line-height: 17px;
padding: 0 4px;
font-size: 11px;
font-style: normal;
color: #fff;
background: var(--knn-color-danger, #ff4d4f);
border-radius: 9px;
box-shadow: 0 0 0 2px var(--knn-bg-color-card, #fff);
} .float-btn.knn-ontop {
opacity: 0;
transform: translateY(10px);
visibility: hidden;
transition: opacity 0.4s, transform 0.4s, visibility 0.4s;
}
.float-btn.knn-ontop.show {
opacity: 1;
transform: translateY(0);
visibility: visible;
} .knn-float-right .hover-show {
position: relative;
z-index: 10;
}
.knn-float-right .hover-show-con {
position: absolute;
right: 100%;
left: auto;
top: 0;
width: 200px;
margin-right: 14px;
padding: 12px;
font-size: 14px;
line-height: 1.4;
text-align: left;
color: var(--knn-text-color, #333);
background: var(--knn-bg-color-card, #fff);
border-radius: 4px;
box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.05);
opacity: 0;
visibility: hidden;
transform: translateX(8px);
transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
cursor: auto;
}
.knn-float-right .hover-show:hover .hover-show-con,
.knn-float-right .hover-show.active .hover-show-con {
opacity: 1;
visibility: visible;
transform: translateX(0);
} .knn-float-right .hover-show-con::before {
content: '';
position: absolute;
right: -5px;
top: 16px;
width: 10px;
height: 10px;
background: inherit;
border-radius: 0 0 3px 0;
transform: rotate(-45deg);
} .float-btn.service-wechat .hover-show-con {
width: 130px;
top: -42px;
padding: 8px;
overflow: hidden;
}
.float-btn.service-wechat .hover-show-con::before {
top: 55px;
}
.float-btn.service-wechat .hover-show-con img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
border-radius: 8px;
} .float-btn.qrcode-btn .hover-show-con {
width: 152px;
top: -60px;
padding: 16px 12px 12px;
text-align: center;
}
.float-btn.qrcode-btn .hover-show-con::before {
top: 74px;
}
.float-btn.qrcode-btn .knn-float-qrcode {
display: inline-flex;
padding: 6px;
background: #fff;
border-radius: 8px;
box-shadow: inset 0 0 0 1px var(--knn-border-color, rgba(0, 0, 0, 0.06));
}
.float-btn.qrcode-btn .knn-float-qrcode img,
.float-btn.qrcode-btn .knn-float-qrcode canvas {
display: block;
}
.float-btn.qrcode-btn .qr-desc {
margin-top: 8px;
font-size: 12px;
color: var(--knn-text-color-grey, #999);
} .float-btn.add-btn .hover-show-con {
width: 140px;
padding: 6px;
}
.float-btn.add-btn .add-menu-item {
display: flex;
align-items: center;
gap: 8px;
padding: 9px 10px;
font-size: 13px;
border-radius: 10px;
color: var(--knn-text-color, #333);
text-decoration: none;
transition: background 0.2s, color 0.2s;
}
.float-btn.add-btn .add-menu-item:hover {
background: var(--knn-bg-color, rgba(0, 122, 255, 0.08));
color: var(--knn-color-primary, #007aff);
}
.float-btn.add-btn .add-menu-item i {
font-size: 14px;
width: 16px;
text-align: center;
} .knn-float-right .em12 {
font-size: 1em;
}
.knn-float-right svg.em12 {
width: 1em;
height: 1em;
vertical-align: middle;
fill: currentColor;
}
.knn-float-right .radius4 {
border-radius: 8px;
} body.dark-mode .knn-float-right .float-btn {
--this-color: #b9b9b9;
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.55);
}
body.dark-mode .knn-float-right.filter .float-btn {
--this-bg: rgba(40, 40, 40, 0.72);
}
body.dark-mode .knn-float-right .hover-show-con {
box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.5);
} @media (max-width: 768px) {
.knn-float-right {
right: 12px;
bottom: 130px; }
.knn-float-right .hover-show-con {
max-width: 240px;
} .float-btn.service-wechat .hover-show-con {
width: 120px;
right: 100%;
margin-right: 10px;
}
}