-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (72 loc) · 3.37 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>404蓝天白云主题动画模板</title>
<link href="404/css/public.css" rel="stylesheet" type="text/css" />
<link href="404/css/index.css" rel="stylesheet" type="text/css" />
<link href="404/css/404.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function() {
var h = $(window).height();
$('body').height(h);
$('.mianBox').height(h);
centerWindow(".tipInfo");
});
//2.将盒子方法放入这个方,方便法统一调用
function centerWindow(a) {
center(a);
//自适应窗口
$(window).bind('scroll resize',
function() {
center(a);
});
}
//1.居中方法,传入需要剧中的标签
function center(a) {
var wWidth = $(window).width();
var wHeight = $(window).height();
var boxWidth = $(a).width();
var boxHeight = $(a).height();
var scrollTop = $(window).scrollTop();
var scrollLeft = $(window).scrollLeft();
var top = scrollTop + (wHeight - boxHeight) / 2;
var left = scrollLeft + (wWidth - boxWidth) / 2;
$(a).css({
"top": top,
"left": left
});
}
</script>
</head>
<body>
<div class="mianBox">
<img src="404/images/yun0.png" alt="" class="yun yun0" />
<img src="404/images/yun1.png" alt="" class="yun yun1" />
<img src="404/images/yun2.png" alt="" class="yun yun2" />
<img src="404/images/bird.png" alt="" class="bird" />
<img src="404/images/san.png" alt="" class="san" />
<div class="tipInfo">
<div class="in">
<div class="textThis">
<h2>404</h2>
<p style="line-height:1.5em;">你找的页面消失了,<span style="color:red;"><b id="wait">600</b>秒</span>后自动跳转<br/><a id="href" href="https://www.baidu.com">度娘:https://www.baidu.com</a></p>
<script type="text/javascript"> (function() {
var wait = document.getElementById('wait'), href = document.getElementById('href').href;
var interval = setInterval(function() {
var time = --wait.innerHTML;
if (time <= 0) {
location.href = href;
clearInterval(interval);
}
;
}, 1000);
})();
</script>
</div>
</div>
</div>
</div>
</body>
</html>