iter(g02): 新增 image 图片组件

This commit is contained in:
HIsheR
2026-10-23 18:59:32 +08:00
parent 0c42c6f71e
commit 33979b23a0
12 changed files with 209 additions and 12 deletions
+43
View File
@@ -1565,3 +1565,46 @@ button.ua-step-dot:hover {
transition: none !important;
}
}
/* ---- image 图片(缩略图 + 遮罩大图预览) ---- */
.ua-image {
display: inline-block;
max-width: 100%;
border-radius: var(--ua-radius-md);
cursor: zoom-in;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ua-image:hover,
.ua-image:focus-visible {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
outline: none;
}
.ua-image-mask {
position: fixed;
inset: 0;
z-index: 1100;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.6); /* 遮罩透明度叠加,非实体色 */
cursor: zoom-out;
animation: ua-image-in 0.18s ease;
}
.ua-image-full {
max-width: 90vw;
max-height: 90vh;
border-radius: var(--ua-radius-md);
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
@keyframes ua-image-in {
from { opacity: 0; transform: scale(0.96); }
to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.ua-image,
.ua-image-mask {
animation: none !important;
transition: none !important;
}
}