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;