From 2674bea223a4f37e6f46e7e0a16bb61c064cbffe Mon Sep 17 00:00:00 2001 From: Sakurasan <26715255+Sakurasan@users.noreply.github.com> Date: Tue, 29 Sep 2026 01:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9C=9F=E6=9C=BA=E4=BF=AE=E5=A4=8D=EF=BC=9Ali?= =?UTF-8?q?ghtbox=20=E6=89=93=E5=BC=80=E6=97=B6=E9=9A=90=E8=97=8F=E5=90=B8?= =?UTF-8?q?=E9=A1=B6=E9=A1=B6=E6=A0=8F=E2=80=94=E2=80=94backdrop-filter=20?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E7=9A=84=E5=90=88=E6=88=90=E5=B1=82=E5=9C=A8?= =?UTF-8?q?=E7=9C=9F=E6=9C=BA=E4=B8=8A=E4=BC=9A=E7=9B=96=E4=BD=8F=20z-inde?= =?UTF-8?q?x=20=E6=9B=B4=E9=AB=98=E7=9A=84=E9=81=AE=E7=BD=A9=EF=BC=88?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=87=BA=E7=8E=B0=E6=9C=AA=E9=81=AE=E7=BD=A9?= =?UTF-8?q?=E4=BA=AE=E5=B8=A6=EF=BC=89=EF=BC=9B=E9=A1=BA=E5=B8=A6=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E8=A7=82=E6=84=9F=E6=9B=B4=E5=B9=B2=E5=87=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ImgLightbox.vue | 5 +++++ frontend/src/styles.css | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/frontend/src/components/ImgLightbox.vue b/frontend/src/components/ImgLightbox.vue index 0755673..73965fa 100644 --- a/frontend/src/components/ImgLightbox.vue +++ b/frontend/src/components/ImgLightbox.vue @@ -20,15 +20,20 @@ watch( window.addEventListener('keydown', onKey) prevOverflow = document.body.style.overflow document.body.style.overflow = 'hidden' + // 吸顶栏带 backdrop-filter,真机上其合成层会盖在遮罩之上 + // (遮罩明明 z-index 更高也拦不住)——索性开预览时整个藏掉 + document.body.classList.add('lb-open') } else { window.removeEventListener('keydown', onKey) document.body.style.overflow = prevOverflow + document.body.classList.remove('lb-open') } } ) onBeforeUnmount(() => { window.removeEventListener('keydown', onKey) document.body.style.overflow = prevOverflow + document.body.classList.remove('lb-open') }) // 手机滑动翻页:横向位移超 44px 且大于纵向位移才算一次滑动 diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 6f53ca6..5cbb2bb 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -1452,6 +1452,12 @@ a.cm-name-a:hover {color: var(--accent);} .admin-shell .image-resize-handle {opacity: 0.45;} .admin-shell .image-wrapper:hover .image-resize-handle {opacity: 1;} +/* lightbox 打开时藏掉吸顶/固定栏:一是全屏观感,二是绕开真机上 + backdrop-filter 元素合成层盖过遮罩的 Chromium 绘制问题 */ +body.lb-open .sticky-head, +body.lb-open .topbar, +body.lb-open .reading-bar {visibility: hidden;} + /* classic 文章页阅读进度条:视口顶部细线,vivid 的同款能力 */ .reading-bar {position: fixed; top: 0;