-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.hbs
82 lines (82 loc) · 2.48 KB
/
error.hbs
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon shortcut" type="image/ico" href="/img/favicon.ico">
<style>
* {
margin: 0;
line-height: 1.5;
}
html {
color: #888;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
text-align: center;
}
body {
left: 50%;
margin: -43px 0 0 -150px;
position: absolute;
top: 20%;
width: 300px;
}
h1 {
color: #555;
font-size: 2em;
font-weight: 400;
}
img {
width: 100%;
}
p {
line-height: 1.2;
}
@media only screen and (max-width: 270px) {
body {
margin: 10px auto;
position: static;
width: 95%;
}
h1 {
font-size: 1.5em;
}
}
</style>
</head>
<body>
<img src="/assets/images/404.jpg" alt="">
<p>页面不存在或被管理员删除, <span id="totalSecond">3</span>秒后自动返回首页</p>
</body>
<script language="javascript" type="text/javascript">
<!--
var second = document.getElementById('totalSecond').textContent;
if (navigator.appName.indexOf("Explorer") > -1) //判断是IE浏览器还是Firefox浏览器,采用相应措施取得秒数
{
second = document.getElementById('totalSecond').innerText;
} else
{
second = document.getElementById('totalSecond').textContent;
}
setInterval("redirect()", 1000); //每1秒钟调用redirect()方法一次
function redirect()
{
if (second < 0)
{
location.href = 'https://www.bilimoe.com/';
} else
{
if (navigator.appName.indexOf("Explorer") > -1)
{
document.getElementById('totalSecond').innerText = second--;
} else
{
document.getElementById('totalSecond').textContent = second--;
}
}
}
-->
</script>
</html>
<!-- IE requires 512+ bytes: http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml -->