feat: add loading screen with fade-out animation

Implement a loading screen that displays while page loads and gracefully fades out after 1.5 seconds. Includes CSS animations and proper cleanup to prevent interaction blocking.
This commit is contained in:
2025-07-16 17:10:45 +08:00
parent c8d2026004
commit 025cd29268
3 changed files with 52 additions and 0 deletions
+37
View File
@@ -1,3 +1,40 @@
/* --- 加载屏幕 --- */
#loading-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #1a1a1a;
display: flex;
justify-content: center;
align-items: center;
z-index: 100;
transition: opacity 0.5s ease-out;
}
#loading-screen img {
width: 150px; /* 或者您希望的任何尺寸 */
height: auto;
animation: pulse-loader 2s infinite;
}
@keyframes pulse-loader {
0% {
transform: scale(1);
opacity: 0.8;
}
50% {
transform: scale(1.1);
opacity: 1;
}
100% {
transform: scale(1);
opacity: 0.8;
}
}
/* --- 基本重置和全局样式 --- */
* {
margin: 0;