优化:图库按时间倒序排列并增强移动端触摸交互

This commit is contained in:
2025-08-29 17:14:35 +08:00
parent 38da294879
commit 8961d8c629
2 changed files with 162 additions and 9 deletions

View File

@@ -239,6 +239,57 @@ body {
opacity: 1;
}
/* 移动端触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
/* 在触摸设备上overlay始终可见但透明度较低 */
.image-overlay {
opacity: 0.3;
background: rgba(0, 0, 0, 0.5);
}
/* 点击时显示完整overlay */
.image-item:active .image-overlay,
.image-item.touched .image-overlay {
opacity: 1;
background: rgba(0, 0, 0, 0.8);
}
/* 为触摸设备添加点击提示 */
.image-item::after {
content: "轻触显示操作";
position: absolute;
bottom: 8px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 12px;
opacity: 0.6;
pointer-events: none;
z-index: 1;
}
.image-item.touched::after {
opacity: 0;
}
}
/* 在小屏幕设备上也应用类似效果 */
@media (max-width: 768px) {
.image-overlay {
opacity: 0.4;
background: rgba(0, 0, 0, 0.6);
}
.image-item:active .image-overlay,
.image-item.touched .image-overlay {
opacity: 1;
background: rgba(0, 0, 0, 0.8);
}
}
/* 状态指示器 */
.status-indicator {
display: inline-block;
@@ -554,6 +605,40 @@ body {
.btn-grid-row .btn {
flex: 1;
min-width: 0;
min-height: 36px;
font-size: 14px;
}
/* 移动端按钮优化 */
@media (max-width: 768px) {
.btn-grid {
gap: 8px;
}
.btn-grid-row {
gap: 8px;
}
.btn-grid-row .btn {
min-height: 44px; /* 增加触摸目标大小 */
font-size: 16px;
padding: 8px;
}
}
/* 触摸设备专用样式 */
@media (hover: none) and (pointer: coarse) {
.btn-grid-row .btn {
min-height: 48px; /* 更大的触摸目标 */
font-size: 18px;
padding: 10px;
transition: all 0.2s ease;
}
.btn-grid-row .btn:active {
transform: scale(0.95);
opacity: 0.8;
}
}
/* 错误状态 */