perf: 代码优化 public/app-loading

This commit is contained in:
pany 2023-05-23 18:15:08 +08:00
parent 8a24b6d219
commit 189d4a2c1c

View File

@ -1,48 +1,45 @@
#app-loading, /* 白屏阶段会执行的 CSS 加载动画 */
#app-loading:before,
#app-loading:after {
border-radius: 50%;
width: 2.5em;
height: 2.5em;
animation-fill-mode: both;
animation: loadingAnimation 1.8s infinite ease-in-out;
}
#app-loading { #app-loading {
position: relative; position: relative;
top: 45vh; top: 45vh;
margin: 0 auto; margin: 0 auto;
font-size: 10px;
color: #409eff; color: #409eff;
text-indent: -9999em; font-size: 12px;
animation-delay: -0.16s; }
transform: translateZ(0);
transform: translate(-50%, 0); #app-loading,
#app-loading:before,
#app-loading:after {
width: 2em;
height: 2em;
border-radius: 50%;
animation: 2s ease-in-out infinite app-loading-animation;
} }
#app-loading:before, #app-loading:before,
#app-loading:after { #app-loading:after {
content: ""; content: "";
position: absolute; position: absolute;
top: 0;
} }
#app-loading:before { #app-loading:before {
left: -3.5em; left: -4em;
animation-delay: -0.32s; animation-delay: -0.2s;
} }
#app-loading:after { #app-loading:after {
left: 3.5em; left: 4em;
animation-delay: 0.2s;
} }
@keyframes loadingAnimation { @keyframes app-loading-animation {
0%, 0%,
80%, 80%,
100% { 100% {
box-shadow: 0 2.5em 0 -1.3em; box-shadow: 0 2em 0 -2em;
} }
40% { 40% {
box-shadow: 0 2.5em 0 0; box-shadow: 0 2em 0 0;
} }
} }