在HTML最底部 添加一个 JS ,代码如下:
$("html").hide(); $(function() { $("head").html('<title>您访问的页面不存在</title>'); $("body").html('<img src="https://www.baidu.com/publicv/img/404.jpg"/>'); $("html").show(); $("html").css({ "width": "100%", "height": "100%" }); $("body").css({ "width": "100%", "font-size": "30px", "height": "100%", "background": "#FFFFFF", "display": "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" }); });