11
2025
04
00:57:04

分享一个仿 Windows 蓝屏的 404 页面

这个 404 页面是模仿的 Windows 的蓝屏界面,非常清爽。


全部代码如下:

  1. <!--**  

  2. * 仿 Windows 蓝屏 404 页面  

  3. * 孟坤博客 编写  

  4. * 文章地址:https://mkblog.cn/556/  

  5. * 编写日期:2017-1-3  

  6. **-->  

  7. <!DOCTYPE html>  

  8. <html>  

  9. <head>  

  10.     <meta charset="utf-8">  

  11.     <meta http-equiv="X-UA-Compatible" content="IE=edge">  

  12.     <meta name="viewport" content="width=device-width, initial-scale=1">  

  13.   

  14.     <title>404 - 页面未找到</title>  

  15.       

  16.     <style type="text/css">  

  17.     body {  

  18.         background-color: #0099CC;  

  19.         color: #FFFFFF;  

  20.         font-family: Microsoft Yahei, "Helvetica Neue", Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;  

  21.         margin-left: 100px;  

  22.     }  

  23.     .face {  

  24.         font-size: 100px;  

  25.     }  

  26.     p{  

  27.         font-size: 24px;  

  28.         padding: 8px;  

  29.         line-height: 40px;  

  30.     }  

  31.     .tips {  

  32.         font-size: 16px  

  33.     }  

  34.       

  35.     /*针对小屏幕的优化*/  

  36.     @media screen and (max-width: 600px) {   

  37.         body{  

  38.             margin: 0 10px;  

  39.         }  

  40.         p{  

  41.             font-size: 18px;  

  42.             line-height: 30px;  

  43.         }  

  44.         .tips {  

  45.             display: inline-block;  

  46.             padding-top: 10px;  

  47.             font-size: 14px;  

  48.             line-height: 20px;  

  49.         }  

  50.     }  

  51.     </style>  

  52. </head>  

  53.   

  54. <body>  

  55.     <script>   

  56.     var i = 5;  //这里是倒计时的秒数  

  57.     var intervalid;   

  58.     intervalid = setInterval("cutdown()", 1000);   

  59.     function cutdown() {   

  60.         if (i == 0) {   

  61.             window.location.href = "http://mkblog.cn"; //倒计时完成后跳转的地址  

  62.             clearInterval(intervalid);   

  63.         }   

  64.         document.getElementById("mes").innerHTML = i;   

  65.         i--;   

  66.     }  

  67.     window.onload = cutdown;  

  68.     </script>  

  69.       

  70.     <span class="face">:(</span>  

  71.     <p>您访问的页面没有找到。<br>  

  72.         <span id="mes"></span> 秒后转至我的个人博客,您可以在那里试着找找您所需要的信息。<br>  

  73.         <span class="tips">如果您想了解更多信息,则可以稍后在线搜索此错误: 算了你还是别搜了……</span>  

  74.     </p>  

  75. </body>  

  76. </html>  



以下是另外一个版本的全部代码:

  1. <!DOCTYPE HTML>  

  2. <html>  

  3. <head>  

  4. <meta charset="UTF-8" />  

  5. <meta name="viewport" content="width=device-width, initial-scale=1">  

  6. <meta name="robots" content="none" />  

  7. <title>404 Not Found</title>  

  8. <style>  

  9. *{font-family:"Microsoft Yahei";margin:0;font-weight:lighter;text-decoration:none;text-align:center;line-height:2.2em;}  

  10. html,body{height:100%;}  

  11. h1{font-size:100px;line-height:1em;}  

  12. table{width:100%;height:100%;border:0;}  

  13. </style>  

  14. </head>  

  15. <body>  

  16. <table cellspacing="0" cellpadding="0">  

  17. <tr>  

  18. <td>  

  19. <table cellspacing="0" cellpadding="0">  

  20. <tr>  

  21. <td>  

  22. <h1>404</h1>  

  23. <h3>大事不妙啦!</h3>  

  24. <p>你访问的页面好像不小心被博主给弄丢了~<br/>  

  25. <a href="/">惩罚博主 ></a>  

  26. </p>  

  27. </td>  

  28. </tr>  

  29. </table>  

  30. </td>  

  31. </tr>  

  32. </table>  

  33. </body>  

  34. </html>  




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://hqyman.cn/post/10374.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏





休息一下~~


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

请先 登录 再评论,若不是会员请先 注册

您的IP地址是: