重构uiController的图片查看器,增加键盘和触摸滑动导航功能

This commit is contained in:
2025-08-29 16:30:10 +08:00
parent c85615797b
commit 38da294879
2 changed files with 239 additions and 113 deletions

View File

@@ -434,6 +434,21 @@ body {
align-items: center;
justify-content: center;
background-color: #000;
position: relative;
}
/* 模态框图片触摸优化 */
#viewerModalImage {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
touch-action: pan-x pan-y;
cursor: grab;
}
#viewerModalImage:active {
cursor: grabbing;
}
/* 翻页按钮样式 */
@@ -471,6 +486,33 @@ body {
color: white;
}
/* 触摸反馈 */
.modal-fullscreen .modal-body .btn-light:active {
transform: scale(0.95);
}
/* 移动端响应式样式 */
@media (max-width: 768px) {
.modal-fullscreen .modal-body .btn-light {
width: 40px;
height: 40px;
font-size: 16px;
}
#prevImageBtn {
left: 10px;
}
#nextImageBtn {
right: 10px;
}
/* 为触摸设备优化图片显示 */
#viewerModalImage {
touch-action: manipulation;
}
}
/* 图像查看模态框特定样式 */
#imageViewerModal .modal-content {
border-radius: 15px;