首先是404.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>404 page</title> <link rel="stylesheet" type="text/css" href="css/index.css"> </head> <body> <img src="image/404.png" alt=""> <div>The requested page fault..... </div> <div style="font-size:30px;">10.112.152.141</div> </body> </html>
其样式代码为:index.css
@charset "uf-8";
img {
margin: 24px auto;
margin-bottom: 30px;
display: block;
}
div {
font-size: 34px;
font-family: songti;
color:#DF0887 ;
text-align: center;
text-decoration: none;
}
运行效果图:
这是最简单的一个错误页面的小练习~~