404页面如何自动跳转到首页?网站404页面是怎么制作的,代码如下。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>404错误!很抱歉,页面搞丢啦……</title>
<style type="text/css">
body {margin:0 auto; padding:0px; font-family:"微软雅黑", Arial, "Trebuchet MS", Verdana, Georgia,Baskerville,Palatino,Times; font-size:16px;}
p{margin-left:auto; margin-right:auto;}
a {text-decoration: none; color: #1064A0;}
a:hover {color: #0078D2;}
img { border:none; }
h2,h3,h4,h5 {
/*display:block;*/
margin:0;
font-weight:normal;
font-family: "微软雅黑", Arial, "Trebuchet MS", Helvetica, Verdana ;
}
h2{font-size:44px; color:#0188DE; padding:20px 0px 10px 0px;}
h3{color:#0188DE; font-size:16px; padding:10px 0px 40px 0px;}
#page{width:80%; margin:0 50; margin-top:80px;}
.button{width:180px; height:28px; margin-left:0px; margin-top:10px; background:#009CFF; border-bottom:4px solid #0188DE; text-align:center;}
.button a{width:180px; height:28px; display:block; font-size:14px; color:#fff; }
.button a:hover{ background:#5BBFFF;}
</style>
</head>
<body>
<div id="page" >
<h2>不好意思,页面丢失了,即将自动跳转网站首页~</h2>
<h3>The website is moving to a new home. It is about to jump to the new website. </h3>
<meta http-equiv="refresh" content="10;url=/">
<font color="#666666">若网页未能自动跳转新网址,请点击下面按钮进行跳转!</font><br /><br />
<p class="button">
<a href="/" >返回首页</a>
</p>
</div>
</body>
</html>
看完了这篇文章,相信你对“web开发中404页面如何自动跳转到首页”有了一定的了解,如果想了解更多相关知识,欢迎关注本站行业资讯频道,感谢各位的阅读!
免责声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,也不承认相关法律责任。如果您发现本社区中有涉嫌抄袭的内容,请发送邮件至:93624862@qq.com进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。本站原创内容未经允许不得转载。
上一篇::中小企业网站建设一般需要那些费用
下一篇:响应式网站建设开发技巧有哪些