forked from lijinke666/javascript-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path加载中.html
43 lines (43 loc) · 1 KB
/
加载中.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>document.onreadystatechange 文档加载状态</title>
<style>
body{
margin: 0;
padding: 0;
font-family: "Microsoft YaHei", Helvetica, Arial, sans-serif;
}
body,html{
width: 100%;
height: 100%;
}
#loading{
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
text-align: center;
font-size: 32px;
line-height: 1.5;
position: fixed;
color: #FFF;
}
</style>
</head>
<body>
<div id="loading">载入中</div>
<img src="../css3/sdy.jpg" alt="">
</body>
<script src="jquery-1.11.3.js"></script>
<script>
$(function(){
var loading = $("#loading");
document.onreadystatechange=function(){
if(document.readyState=="complete"){
loading.remove();
}
}
})
</script>
</html>