refactor(index.html): ♻️ 首屏加载loading样式
This commit is contained in:
73
index.html
73
index.html
@@ -17,7 +17,13 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="loader"></div>
|
<div class="loading-container">
|
||||||
|
<div class="loading-spinner">
|
||||||
|
<div class="loading-bar"></div>
|
||||||
|
<div class="loading-bar"></div>
|
||||||
|
<div class="loading-bar"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
@@ -34,27 +40,56 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loader {
|
.loading-container {
|
||||||
--d: 22px;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
width: 4px;
|
gap: 24px;
|
||||||
height: 4px;
|
align-items: center;
|
||||||
color: #25b09b;
|
justify-content: center;
|
||||||
border-radius: 50%;
|
}
|
||||||
box-shadow:
|
|
||||||
calc(1 * var(--d)) calc(0 * var(--d)) 0 0,
|
.loading-spinner {
|
||||||
calc(0.707 * var(--d)) calc(0.707 * var(--d)) 0 1px,
|
display: flex;
|
||||||
calc(0 * var(--d)) calc(1 * var(--d)) 0 2px,
|
gap: 6px;
|
||||||
calc(-0.707 * var(--d)) calc(0.707 * var(--d)) 0 3px,
|
align-items: center;
|
||||||
calc(-1 * var(--d)) calc(0 * var(--d)) 0 4px,
|
justify-content: center;
|
||||||
calc(-0.707 * var(--d)) calc(-0.707 * var(--d)) 0 5px,
|
height: 40px;
|
||||||
calc(0 * var(--d)) calc(-1 * var(--d)) 0 6px;
|
}
|
||||||
animation: l27 1s infinite steps(8);
|
|
||||||
|
.loading-bar {
|
||||||
|
width: 4px;
|
||||||
|
height: 24px;
|
||||||
|
background-color: #498cff;
|
||||||
|
border-radius: 2px;
|
||||||
|
animation: loading-animation 1.2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-bar:nth-child(1) {
|
||||||
|
animation-delay: 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-bar:nth-child(2) {
|
||||||
|
animation-delay: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-bar:nth-child(3) {
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes loading-animation {
|
||||||
|
0% {
|
||||||
|
opacity: 0.3;
|
||||||
|
transform: scaleY(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scaleY(1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes l27 {
|
|
||||||
100% {
|
100% {
|
||||||
transform: rotate(1turn);
|
opacity: 0.3;
|
||||||
|
transform: scaleY(0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user