这个就不多说了,直接贴代码,使用方法就是把这些代码全部拷贝进你的404.php这个文件。后台点击外观-编辑-选择404.php,开始编辑,
完成后然后就可以自己测试下效果了,你也可以先访问http://leaver.me/test404查看效果
<title>404</title> <style type="text/css"> body{ margin:0; padding:0; font:14px/1.6 Arial,Sans-serif; background:#fff url(img/body.png) repeat-x; } a:link,a:visited{ color:#007ab7; text-decoration:none; } h1{ position:relative; z-index:2; width:540px; height:0; margin:110px auto 15px; padding:230px 0 0; overflow:hidden; xxxxborder:1px solid; background-image: url(http://leaverimage.b0.upaiyun.com/20346_o.jpg); background-repeat: no-repeat; } h2{ position:absolute; top:17px; left:187px; margin:0; font-size:0; text-indent:-999px; -moz-user-select:none; -webkit-user-select:none; user-select:none; cursor:default; width: 534px; } h2 em{ display:block; font:italic bold 200px/120px "Times New Roman",Times,Serif; text-indent:0; letter-spacing:-5px; color:rgba(216,226,244,0.3); } .link a{margin-right:1em;} .link,.texts{ width:540px; margin:0 auto 15px; color:#505050; } .texts{line-height:2;} .texts dd{margin:0;padding:0 0 0 15px;} .texts ul{margin:0;padding:0;} .portal{ color:#505050; text-align:center; white-space:nowrap; word-spacing:0.45em; } .portal a:link,.portal a:visited{ color:#505050; word-spacing:0; } .portal a:hover,.portal a:active{color:#007ab7;} .portal span{ display:inline-block; height:38px; line-height:35px; background:url(img/portal.png) repeat-x; } .portal span span{ padding:0 0 0 20px; background:url(img/portal.png) no-repeat 0 -40px; } .portal span span span{padding:0 20px 0 0;background-position:100% -80px;} .STYLE1 { font-family: Arial, Helvetica, sans-serif; font-size: 65px; } </style> <!--[if lte IE 8]> <style type="text/css"> h2 em{color:#e4ebf8;} </style> <![endif]--> <script type="text/javascript"> var i = 5; var intervalid; intervalid = setInterval("fun()", 1000); function fun() { if (i == 0) { window.location.href = "<?php bloginfo('url'); ?>"; clearInterval(intervalid); } document.getElementById("secondsDisplay").innerHTML = i; i--; } </script> </head> <body> <h1></h1> <h2><em><span class="STYLE1">404 Error </span></em>: 您所查找的页面不存在,可能已被删除或您输错了网址!</h2> <p class="link"> <a href="/">◂返回首页</a> <a href="javascript:history.go(-1);">◂返回上一页</a> </p> <dl class="texts"> <dt>我正在联系火星总部查找您所需要的页面.请返回等待信息..</dt> <dd> <ul> <li>不要返回吗?</li> <li>确定不要返回吗?</li> <li>真的真的确定不要返回吗?</li> <li>系统在 <span id="secondsDisplay" style="font-size:20px;color:red;">5</span> 秒钟之后带你返回地球。</li> </ul> </dd> </dl> </body>