Files
wordpress-theme-aksrt/assets/css/frontend/ajax-spinner.css
T

115 lines
2.3 KiB
CSS

/* ========== AJAX 加载指示器 — 对齐 zibll loading spinner ========== */
.aksrt-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 40px 20px;
color: var(--color-ink-4, #999);
font-size: 13px;
gap: 8px;
}
.aksrt-loading__spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid var(--surface-3, #e8e8e8);
border-top-color: var(--color-primary, #f04494);
border-radius: 50%;
animation: aksrt-spin 0.6s linear infinite;
}
@keyframes aksrt-spin {
to { transform: rotate(360deg); }
}
/* 全屏加载遮罩 */
.aksrt-loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
backdrop-filter: blur(2px);
}
.aksrt-loading-overlay__content {
text-align: center;
}
.aksrt-loading-overlay__spinner {
width: 36px;
height: 36px;
border: 3px solid var(--surface-3, #e8e8e8);
border-top-color: var(--color-primary, #f04494);
border-radius: 50%;
animation: aksrt-spin 0.6s linear infinite;
margin: 0 auto 12px;
}
.aksrt-loading-overlay__text {
font-size: 13px;
color: var(--color-ink-3, #777);
}
/* 行内加载(替换内容时) */
.aksrt-loading-inline {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
color: var(--color-ink-4, #999);
font-size: 12px;
gap: 6px;
}
.aksrt-loading-inline__dot {
width: 6px;
height: 6px;
background: var(--color-primary, #f04494);
border-radius: 50%;
animation: aksrt-dot-pulse 1.2s ease-in-out infinite;
}
.aksrt-loading-inline__dot:nth-child(2) {
animation-delay: 0.2s;
}
.aksrt-loading-inline__dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes aksrt-dot-pulse {
0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
40% { opacity: 1; transform: scale(1); }
}
/* 页面加载进度条 */
.aksrt-progress-bar {
position: fixed;
top: 0;
left: 0;
height: 2px;
background: var(--color-primary, #f04494);
z-index: 10000;
transition: width 0.3s ease;
}
/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
.aksrt-loading__spinner,
.aksrt-loading-overlay__spinner {
animation-duration: 1.5s;
}
.aksrt-loading-inline__dot {
animation: none;
opacity: 0.6;
}
}