分享一段简洁大气的404纯代码错误页的模板,有需要的直接复制拿走。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>404 - Page Not Found</title> <style> /* 全局样式 */ body { font-family: Arial, sans-serif; background-color: #f4f4f4; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } h1 { color: #333; } p { color: #666; } /* 404 元素样式 */ #error { font-size: 100px; color: #ccc; } /* 按钮样式 */ a { background-color: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin-top: 20px; transition: background-color 0.3s ease; text-decoration: none; } </style> </head> <body> <div id="error">404</div> <h1>未找到相关页面</h1> <p>抱歉,您访问的页面可能不存在或者被删除!</p> <a href="https://wz.5300.cn" target="_blank" >返回首页</a> </body> </html>
预览效果:
标签:简洁,color,拿走,404,background,模板 From: https://www.cnblogs.com/dengcao/p/18547693