创意的404错误页面模板报错设计

maolai web前端评论186阅读模式

创建自定义404页面html和css,这是一款网站必备的404错误页面模板,创意404报错设计,画面中呈现了数字卡通结合的图案设计,新奇有创意,适用于任意类型的网站。

创意的404错误页面模板报错设计

一、html代码

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>博客趣 - Create Custom 404 Page in HTML and CSS</title>
  <link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
<div class="error-page-container">
    <img src="http://www.bokequ.com/show/404/1/page_not_found_su7k.svg" alt="404">
    <h4>
      哎呀!您正在查找的页面不存在
    </h4>
    <p>
      <a href="http://www.bokequ.com/" class="button">
        转到主页
      </a>
    </p>
  </div>
<!-- partial -->
</body>
</html>

二、css样式

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
}

.error-page-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url(./bg.png) center no-repeat;
  background-size: cover;
  position: relative;
  padding: 0 20px;
}
.error-page-container:after {
  content: '';
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  position: absolute;
  top: 0; left: 0;
}
.error-page-container * {
  position: relative;
  z-index: 1;
}
.error-page-container img {
  width: 100%;
  max-width: 500px;
  margin-bottom: 25px;
}
.error-page-container h4 {
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.error-page-container .button {
  display: inline-block;
  margin-top: 20px;
  padding: 18px 30px;
  background: white;
  color: #6c63ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
}
.error-page-container .button:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

创意的404错误页面模板报错设计演示地址 404错误报错页面

 
maolai
  • 本文由 maolai 发表于 2018年6月23日 21:34:55
  • 转载请务必保留本文链接:http://www.bokequ.com/456.html

发表评论