当前位置:首页 > 教程 > 帝国cms > 自定义页面/模板

9.3 应用举例 自定义页面404

跳转链接:

<meta http-equiv="refresh" content="5;url=[!--news.url--]">

页面代码:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>您访问的网页不存在</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="refresh" content="5;url=[!--news.url--]">
<style>
.notfoud-container .img-404 { height: 155px; background: url(../template/images/404bj.png) center center no-repeat; -webkit-background-size: 150px auto; margin-top: 40px; margin-bottom: 20px }
.notfoud-container .notfound-p { line-height: 22px; font-size: 17px; padding-bottom: 15px; border-bottom: 1px solid #f6f6f6; text-align: center; color: #262b31 }
.notfoud-container .notfound-reason { color: #9ca4ac; font-size: 13px; line-height: 13px; text-align: left; width: 210px; margin: 0 auto }
.notfoud-container .notfound-reason p { margin-top: 13px }
.notfoud-container .notfound-reason ul li { margin-top: 10px; margin-left: 36px }
.notfoud-container .notfound-btn-container { margin: 40px auto 0; text-align: center }
.notfoud-container .notfound-btn-container .notfound-btn { display: inline-block; border: 1px solid #ebedef; background-color: #239bf0; color: #fff; font-size: 15px; border-radius: 5px; text-align: center; padding: 10px; line-height: 16px; white-space: nowrap }
</style>
</head>
<body>
<div class="notfoud-container">
  <div class="img-404"> </div>
  <p class="notfound-p">哎呀迷路了...</p>
  <div class="notfound-reason">
    <p>可能的原因:</p>
    <ul>
      <li>原来的页面不存在了</li>
      <li>我们的服务器被外星人劫持了</li>
    </ul>
  </div>
  <div class="notfound-btn-container"> <a class="notfound-btn" href="[!--news.url--]">返回首页</a> </div> 
</div>
</body>
</html>

[!--news.url--]是网站的链接字段,直接写出来也行:https://www.xiaquer.com/

你觉得文章内容怎么样

阿里云代金券 100 云产品通用

有效期30天 首购用户

立即领取
推荐宝塔面板 0 安全高效的

服务器运维面板

立即领取