-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
141 lines (123 loc) · 3.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="renderer" content="webkit" />
<title>毛呆</title>
</head>
<body>
<div id="loading" style="display: none;">
<!-- 加载动画 -->
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<style>
.spinner {
position: absolute;
z-index: -1;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
justify-content: space-between;
width: 20vw;
max-width: 100px;
}
.spinner>div {
background-color: #70caac;
flex-basis: 15%;
height: 0;
padding-bottom: 50%;
-webkit-animation: spinner-animation 1.2s infinite ease-in-out;
animation: spinner-animation 1.2s infinite ease-in-out;
}
.spinner .rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.spinner .rect3 {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
.spinner .rect4 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.spinner .rect5 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
@-webkit-keyframes spinner-animation {
0%,
40%,
100% {
transform: scaleY(1);
}
20% {
transform: scaleY(2.4);
}
}
@keyframes spinner-animation {
0%,
40%,
100% {
transform: scaleY(1);
}
20% {
transform: scaleY(2.4);
}
}
</style>
<script>; (function () {
var duration = 500
var minLoadingTime = 300
var startTime = Date.now()
var removed = false
var el = document.getElementById('loading')
if (el) {
el.style.backgroundColor = '#282c34'
el.style.position = 'fixed'
el.style.top = '0'
el.style.bottom = '0'
el.style.left = '0'
el.style.right = '0'
el.style.zIndex = '100000'
el.style.transition = 'opacity ' + duration + 'ms'
el.style.opacity = '0'
el.style.display = null
setTimeout(function () {
if (el) {
el.style.opacity = '1'
}
}, minLoadingTime)
}
window.$removeLoading = function () {
if (removed || !el) {
return
}
removed = false
el.style.opacity = '0'
var delay = Date.now() - startTime < minLoadingTime ? 0 : duration
setTimeout(function () {
el.parentElement.removeChild(el)
el = null
}, delay)
}
})()
</script>
</div>
<div id="app">
<noscript>
<p>很抱歉,如果没有启用JavaScript,项目将无法正常运行。请先启用它。</p>
</noscript>
</div>
<div id="overlay"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>