iter(g51): 新增 backTop 返回顶部按钮
This commit is contained in:
@@ -2963,3 +2963,54 @@ button.ua-step-dot:hover {
|
||||
.ua-datepicker-day,
|
||||
.ua-datepicker-nav { transition: none; }
|
||||
}
|
||||
.ua-backtop {
|
||||
position: fixed;
|
||||
right: 24px;
|
||||
bottom: 24px;
|
||||
z-index: 60;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 0;
|
||||
color: var(--ua-color-accent-contrast);
|
||||
background: var(--ua-color-accent);
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transform: translateY(8px) scale(0.9);
|
||||
pointer-events: none;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
box-shadow: 0 8px 20px color-mix(in srgb, var(--ua-color-accent) 35%, transparent);
|
||||
}
|
||||
.ua-backtop.is-visible {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.ua-backtop.is-visible:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.ua-backtop:focus-visible {
|
||||
outline: 2px solid var(--ua-color-accent);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
.ua-backtop-ring {
|
||||
position: absolute;
|
||||
inset: -4px;
|
||||
border-radius: 50%;
|
||||
pointer-events: none;
|
||||
-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), var(--ua-color-text) calc(100% - 3px));
|
||||
mask: radial-gradient(farthest-side, transparent calc(100% - 3px), var(--ua-color-text) calc(100% - 3px));
|
||||
}
|
||||
.ua-backtop-icon {
|
||||
font-size: var(--ua-font-size-lg);
|
||||
line-height: 1;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ua-backtop {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user