优化:图库按时间倒序排列并增强移动端触摸交互
This commit is contained in:
85
styles.css
85
styles.css
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/* 错误状态 */
|
||||
|
||||
Reference in New Issue
Block a user