大家還記得Windows時代經典的藍白當機(藍屏)畫面麼?今天「暢想資源」就爲大家帶來如何將WordPress的404錯誤頁面修改爲Windows經典藍白當機畫面,讓你的訪客大吃一驚吧~
預覽
點擊「這裏」查看線上網頁預覽
教學
將下方代碼添加並替換到「404 錯誤(找不到檔案)模板 (404.php)」內的所有代碼(記得備份!),然後點擊 即可!
提示:大家可以自由更改代碼內的內容,不過推薦僅使用英文,因爲該字體其實是沒有中文庫的哦~
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
<!DOCTYPE html> <html> <head> <title>- ooops! -</title> <style> body { background:#0000aa; color:#ffffff; font-family:courier; font-size:12pt; text-align:center; margin:100px; } blink { color:yellow; } .neg { background:#fff; color:#0000aa; padding:2px 8px; font-weight:bold; } p { margin:30px 100px; text-align:left; } a,a:hover { color:inherit; font:inherit; } .menu { text-align:center; margin-top:50px; } .input_type { text-decoration: blink; } </style> </head> <body> <span class="neg">ERROR 404</span> <p> The page is missing or never was written. You can wait and<br /> see if it becomes available again, or you can restart your browser. </p> <p> * Send us an e-mail to notify this and try it later.<br /> * Press CTRL+ALT+DEL to restart your computer. You will<br /> lose unsaved information in any programs that are running. </p> Press any link to continue <span class="input_type">_</span> <div class="menu"> <a href="<?php echo get_site_url(); ?>">Home</a> </div> </body> </html> |
參考
[惡搞專用]把你的WordPress 404頁面變成當機的藍白畫面