源码介绍
动态代码打印特效404页面模板HTML源码,黑色背景,上面http 404表达这个页面的作用,下面彩色打印js代码,其主要内容也是存托这个404页面,很适合用来做网站错误页,源码是HTML+CSS+JS,记事本里面进行编辑修改,然后将下面代码拷贝到一个空白的404.html里面即可,鼠标双击html文件可以本地查看效果,也可以上传到服务器里面,将错误页面重定向到这个页面即可
效果预览
完整源码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Code-Theme 404 Page</title>
<style>@import url("https://fonts.googleapis.com/css?family=Bevan");
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background: #282828;
overflow: hidden;
}
p {
font-family: "Bevan", cursive;
font-size: 130px;
margin: 10vh 0 0;
text-align: center;
letter-spacing: 5px;
background-color: black;
color: transparent;
text-shadow: 2px 2px 3px rgba(255, 255, 255, 0.1);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
}
p span {
font-size: 1.2em;
}
code {
color: #bdbdbd;
text-align: center;
display: block;
font-size: 16px;
margin: 0 30px 25px;
}
code span {
color: #f0c674;
}
code i {
color: #b5bd68;
}
code em {
color: #b294bb;
font-style: unset;
}
code b {
color: #81a2be;
font-weight: 500;
}
a {
color: #8abeb7;
font-family: monospace;
font-size: 20px;
text-decoration: underline;
margin-top: 10px;
display: inline-block;
}
@media screen and (max-width: 880px) {
p {
font-size: 14vw;
}
}</style>
</head>
<!--QQ沐编程 www.qqmu.com 学习QQ群:290987565 域名抢注 https://www.juming.com/t/33210x2a49c4 -->
<body>
<p>HTTP: <span>404</span></p>
<code><span>this_page</span>.<em>not_found</em> = true;</code>
<code><span>if</span> (<b>you_spelt_it_wrong</b>) {<span>try_again()</span>;}</code>
<code><span>else if (<b>we_screwed_up</b>)</span> {<em>alert</em>(<i>"We're really sorry about that."</i>); <span>window</span>.<em>location</em> = home;}</code>
<center><a href="http://www.qqmu.com/">HOME</a></center>
<script>function type(n, t) {
var str = document.getElementsByTagName("code")[n].innerHTML.toString();
var i = 0;
document.getElementsByTagName("code")[n].innerHTML = "";
setTimeout(function() {
var se = setInterval(function() {
i++;
document.getElementsByTagName("code")[n].innerHTML =
str.slice(0, i) + "|";
if (i == str.length) {
clearInterval(se);
document.getElementsByTagName("code")[n].innerHTML = str;
}
}, 10);
}, t);
}
type(0, 0);
type(1, 600);
type(2, 1300);
</script>
</body>
</html>
更多好看的404页面html源码可以搜索QQ沐编程,觉得有帮助的话可以CTRL+D收藏一下本站
© 版权声明
本站资源来自互联网收集,仅供用于学习和交流,请勿用于商业用途。如有侵权、不妥之处,请联系站长并出示版权证明以便删除。敬请谅解!
THE END