From 9accd178365f18d5d1d578224cbd0a5595eb87e1 Mon Sep 17 00:00:00 2001 From: Omega Date: Mon, 20 Apr 2026 23:53:19 +0800 Subject: [PATCH] fix: restore in-view class assignment so pain-point content is visible on mobile --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index ca0bfe0..f787d64 100644 --- a/index.html +++ b/index.html @@ -1030,6 +1030,10 @@ } else { isAnimating = false; currentIndex = index; + // 给当前及之前所有卡片加 in-view,确保内容可见 + snapTargets.forEach((t, i) => { + if (i <= index) t.classList.add('in-view'); + }); } } animFrame = requestAnimationFrame(step); @@ -1037,6 +1041,10 @@ // 初始化 currentIndex = findCurrentIndex(); + // 初始就给当前屏加 in-view + snapTargets.forEach((t, i) => { + if (i <= currentIndex) t.classList.add('in-view'); + }); // 完全接管触摸滚动 - 禁止原生滚动 let canScroll = true;