mirror of
https://github.com/Ad-closeNN/blog-fuwari.git
synced 2026-05-31 02:00:05 -04:00
fix: 修复卡片载入动画重复播放的问题
CodeGeeX GLM 4.7 牛逼
This commit is contained in:
Vendored
+2
-1
@@ -28,5 +28,6 @@
|
|||||||
"[json]": {
|
"[json]": {
|
||||||
"editor.defaultFormatter": "vscode.json-language-features"
|
"editor.defaultFormatter": "vscode.json-language-features"
|
||||||
},
|
},
|
||||||
"markdown.validate.enabled": false
|
"markdown.validate.enabled": false,
|
||||||
|
"Codegeex.RepoIndex": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ const interval = 50;
|
|||||||
image={entry.data.image}
|
image={entry.data.image}
|
||||||
description={entry.data.description}
|
description={entry.data.description}
|
||||||
draft={entry.data.draft}
|
draft={entry.data.draft}
|
||||||
class:list="onload-animation"
|
|
||||||
style={`animation-delay: calc(var(--content-delay) + ${delay++ * interval}ms);`}
|
|
||||||
></PostCard>
|
></PostCard>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -412,6 +412,13 @@ function showBanner() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 在显示Banner前,先移除所有已加载的onload-animation类,防止动画重复触发
|
||||||
|
const animatedElements = document.querySelectorAll('.onload-animation');
|
||||||
|
animatedElements.forEach(el => {
|
||||||
|
el.style.animation = 'none';
|
||||||
|
el.style.opacity = '1';
|
||||||
|
});
|
||||||
|
|
||||||
banner.classList.remove('opacity-0', 'scale-105');
|
banner.classList.remove('opacity-0', 'scale-105');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user