web_framework/index.html
2025-03-28 16:59:20 +08:00

114 lines
2.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/public/vite.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>%VITE_WEB_TITLE%</title>
<!-- 加载第一步开始 -->
<style>
.loading-box {
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column; /* 使用列布局 */
align-items: center; /* 水平居中 */
justify-content: center; /* 垂直居中 */
width: 100vw;
height: 100vh;
background: #D8D8D8;
overflow: hidden;
z-index: 9999;
}
.loader-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px; /* 设置加载器和文字之间的间距 */
}
.loader {
width: 48px;
height: 48px;
position: relative;
}
.loader:before {
content: '';
width: 48px;
height: 5px;
background: #3D6AFF;
position: absolute;
top: 60px;
left: 0;
border-radius: 50%;
animation: loading-shadow 0.5s linear infinite;
}
.loader:after {
content: '';
width: 100%;
height: 100%;
background: #3D6AFF;
position: absolute;
top: 0;
left: 0;
border-radius: 4px;
animation: loading-jump 0.5s linear infinite;
}
@keyframes loading-jump {
15% {
border-bottom-right-radius: 3px;
}
25% {
transform: translateY(9px) rotate(22.5deg);
}
50% {
transform: translateY(18px) scale(1, .9) rotate(45deg);
border-bottom-right-radius: 40px;
}
75% {
transform: translateY(9px) rotate(67.5deg);
}
100% {
transform: translateY(0) rotate(90deg);
}
}
@keyframes loading-shadow {
0%, 100% {
transform: scale(1, 1);
}
50% {
transform: scale(1.2, 1);
}
}
.loading-text {
color: #557CFF;
font-size: 32px;
font-weight: 500;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}
</style>
<!-- 加载第一步结束 -->
</head>
<body>
<div id="app">
<!-- 第二步开始 -->
<div class="loading-box">
<div class="loader-container">
<div class="loader"></div>
<p class="loading-text">%VITE_WEB_TITLE%</p>
</div>
</div>
<!-- 第二步结束 -->
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>