-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
82 lines (70 loc) · 1.26 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
<!--
描述:网页加载效果
-->
<!--首先引入必要的jQuery-->
<script src="js/jquery.min.js"></script>
<div class="loadingBg">
<div class="loading">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<style>
.loadingBg {
position: fixed;
width: 100%;
height: 100%;
background-color: white;
z-index: 99999;
}
.loading {
position: relative;
width: 85px;
height: 40px;
margin: -20px auto auto -40px;
top: 50%;
left: 50%;
}
.loading span {
display: inline-block;
width: 8px;
height: 100%;
border-radius: 4px;
background: lightgreen;
-webkit-animation: load 1s ease infinite;
}
@-webkit-keyframes load {
0%,
100% {
height: 40px;
background: lightgreen;
}
50% {
height: 70px;
margin: -15px 0;
background: lightblue;
}
}
.loading span:nth-child(2) {
-webkit-animation-delay: 0.2s;
}
.loading span:nth-child(3) {
-webkit-animation-delay: 0.4s;
}
.loading span:nth-child(4) {
-webkit-animation-delay: 0.6s;
}
.loading span:nth-child(5) {
-webkit-animation-delay: 0.8s;
}
</style>
<script>
document.onreadystatechange = function () {
if (document.readyState == "complete") {
$(".loadingBg").fadeOut(500);
}
}
</script>