fix: 扫描遮罩毛玻璃模糊不生效

- 根因1: backdrop-filter 加在进度卡片上,卡片背后是深色遮罩层,模糊作用在被压暗内容上不可见 → 移到遮罩层本身
- 根因2: 标准 backdrop-filter 与 -webkit- 前缀双写时被 Vite8 CSS 压缩链去重,只保留前缀属性,标准属性丢失 → 只写标准属性(压缩器自动补前缀)
- 验证: puppeteer-core 实测 computed backdrop-filter = blur(14px) saturate(1.3),背景内容完全模糊
This commit is contained in:
陈银军
2026-09-19 21:22:07 +08:00
parent 8a54fb2d5c
commit 922d4b3a12
2 changed files with 10 additions and 8 deletions
+10 -8
View File
@@ -106,9 +106,9 @@ onMounted(() => {
animation: blink 1.2s ease-in-out infinite;
}
/* —— 扫描遮罩(玻璃拟态:半透明背景 + 卡片磨砂模糊 + 细边框/高光)
遮罩层只做半透明(避免全屏 blur 的性能开销与双倍模糊),
真正的毛玻璃效果做在卡片上:半透明背景 + backdrop-filter 模糊 + 细边框 + 高光 —— */
/* —— 扫描遮罩(玻璃拟态:半透明背景 + 页面模糊 + 细边框/高光)
遮罩层负责模糊:半透明背景 + backdrop-filter blur 使背后页面内容呈现磨砂玻璃感;
卡片只做半透明 + 细边框 + 高光,不叠加自身 blur(避免双倍模糊) —— */
.scan-mask {
position: fixed;
inset: 0;
@@ -116,13 +116,15 @@ onMounted(() => {
display: grid;
place-items: center;
background: rgba(18, 16, 14, .38);
backdrop-filter: blur(14px) saturate(1.3);
}
html[data-theme="bright"] .scan-mask {
background: rgba(244, 242, 239, .45);
backdrop-filter: blur(14px) saturate(1.3);
}
html[data-theme="bright"] .scan-mask { background: rgba(244, 242, 239, .45); }
.scan-card {
position: relative;
background: rgba(28, 26, 24, .55);
backdrop-filter: blur(18px) saturate(1.35);
-webkit-backdrop-filter: blur(18px) saturate(1.35);
background: rgba(28, 26, 24, .62);
border: 1px solid rgba(255, 255, 255, .14);
border-radius: 20px;
box-shadow:
@@ -137,7 +139,7 @@ html[data-theme="bright"] .scan-mask { background: rgba(244, 242, 239, .45); }
max-width: 92vw;
}
html[data-theme="bright"] .scan-card {
background: rgba(255, 255, 255, .55);
background: rgba(255, 255, 255, .6);
border-color: rgba(255, 255, 255, .55);
box-shadow:
0 24px 60px -16px rgba(0, 0, 0, .22),