下雪了动态特效404单页HTML源码

源码介绍

下雪了动态特效404单页HTML源码,具有下雪特效,可以做网站错误页或者丢失页面,将下面的代码放到空白的HTML里面,然后上传到服务器里面,设置好重定向即可

效果预览

在这里插入图片描述

完整源码

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Fargo 404</title>
		<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Dosis:400,300,500,800">
		<style type="text/css">
			html,
			body {
			  height: 100%;
			  min-height: 450px;
			  font-family: "Dosis", sans-serif;
			  font-size: 32px;
			  font-weight: 500;
			  color: #5d7399;
			}
			
			.content {
			  height: 100%;
			  position: relative;
			  z-index: 1;
			  background-color: #d2e1ec;
			  background-image: linear-gradient(to bottom, #bbcfe1 0%, #e8f2f6 80%);
			  overflow: hidden;
			}
			
			.snow {
			  position: absolute;
			  top: 0;
			  left: 0;
			  pointer-events: none;
			  z-index: 20;
			}
			
			.main-text {
			  padding: 20vh 20px 0 20px;
			  text-align: center;
			  line-height: 2em;
			  font-size: 5vh;
			}
			
			.home-link {
			  font-size: 0.6em;
			  font-weight: 400;
			  color: inherit;
			  text-decoration: none;
			  opacity: 0.6;
			  border-bottom: 1px dashed rgba(93, 115, 153, 0.5);
			}
			.home-link:hover {
			  opacity: 1;
			}
			
			.ground {
			  height: 160px;
			  width: 100%;
			  position: absolute;
			  bottom: 0;
			  left: 0;
			  background: #f6f9fa;
			  box-shadow: 0 0 10px 10px #f6f9fa;
			}
			.ground:before, .ground:after {
			  content: "";
			  display: block;
			  width: 250px;
			  height: 250px;
			  position: absolute;
			  top: -62.5px;
			  z-index: -1;
			  background: transparent;
			  transform: scaleX(0.2) rotate(45deg);
			}
			.ground:after {
			  left: 50%;
			  margin-left: -166.6666666667px;
			  box-shadow: -340px 260px 15px #bac4d5, -625px 575px 15px #91a1bc, -855px 945px 15px #7e90b0, -1165px 1235px 15px #b0bccf, -1470px 1530px 15px #94a3be, -1750px 1850px 15px #91a1bc, -2145px 2055px 15px #b0bccf, -2400px 2400px 15px #7e90b0, -2665px 2735px 15px #a7b4c9, -2965px 3035px 15px #8496b4, -3260px 3340px 15px #94a3be, -3580px 3620px 15px #97a6c0, -3885px 3915px 15px #9aa9c2, -4160px 4240px 15px #8193b2, -4470px 4530px 15px #8e9eba, -4845px 4755px 15px #7e90b0;
			}
			.ground:before {
			  right: 50%;
			  margin-right: -166.6666666667px;
			  box-shadow: 260px -340px 15px #b0bccf, 630px -570px 15px #a1aec6, 925px -875px 15px #94a3be, 1170px -1230px 15px #a7b4c9, 1535px -1465px 15px #a7b4c9, 1845px -1755px 15px #8a9bb8, 2150px -2050px 15px #b7c1d3, 2445px -2355px 15px #8798b6, 2735px -2665px 15px #bac4d5, 3015px -2985px 15px #94a3be, 3270px -3330px 15px #b7c1d3, 3620px -3580px 15px #8193b2, 3860px -3940px 15px #9dabc4, 4215px -4185px 15px #8798b6, 4485px -4515px 15px #8e9eba, 4810px -4790px 15px #bac4d5;
			}
			
			.mound {
			  margin-top: -80px;
			  font-weight: 800;
			  font-size: 180px;
			  text-align: center;
			  color: #dd4040;
			  pointer-events: none;
			}
			.mound:before {
			  content: "";
			  display: block;
			  width: 600px;
			  height: 200px;
			  position: absolute;
			  left: 50%;
			  margin-left: -300px;
			  top: 50px;
			  z-index: 1;
			  border-radius: 100%;
			  background-color: #e8f2f6;
			  background-image: linear-gradient(to bottom, #dee8f1, #f6f9fa 60px);
			}
			.mound:after {
			  content: "";
			  display: block;
			  width: 28px;
			  height: 6px;
			  position: absolute;
			  left: 50%;
			  margin-left: -150px;
			  top: 68px;
			  z-index: 2;
			  background: #dd4040;
			  border-radius: 100%;
			  transform: rotate(-15deg);
			  box-shadow: -56px 12px 0 1px #dd4040, -126px 6px 0 2px #dd4040, -196px 24px 0 3px #dd4040;
			}
			
			.mound_text {
			  transform: rotate(6deg);
			}
			
			.mound_spade {
			  display: block;
			  width: 35px;
			  height: 30px;
			  position: absolute;
			  right: 50%;
			  top: 42%;
			  margin-right: -250px;
			  z-index: 0;
			  transform: rotate(35deg);
			  background: #dd4040;
			}
			.mound_spade:before, .mound_spade:after {
			  content: "";
			  display: block;
			  position: absolute;
			}
			.mound_spade:before {
			  width: 40%;
			  height: 30px;
			  bottom: 98%;
			  left: 50%;
			  margin-left: -20%;
			  background: #dd4040;
			}
			.mound_spade:after {
			  width: 100%;
			  height: 30px;
			  top: -55px;
			  left: 0%;
			  box-sizing: border-box;
			  border: 10px solid #dd4040;
			  border-radius: 4px 4px 20px 20px;
			}
		</style>
	</head>
	<!--QQ沐编程 www.qqmu.com 学习QQ群:290987565  -->
	<body>	
		<div class="content">
		  <canvas class="snow" id="snow"></canvas>
		  <div class="main-text">
		    <h1>Aw jeez.<br/>That page has gone missing.</h1><a class="home-link" href="https://www.qqmu.com">Hitch a ride back home.</a>
		  </div>
		  <div class="ground">
		    <div class="mound"> 
		      <div class="mound_text">404</div>
		      <div class="mound_spade"></div>
		    </div>
		  </div>
		</div>
		<script type="text/javascript">
			(function() {
				function ready(fn) {
					if (document.readyState != 'loading'){
						fn();
					} else {
						document.addEventListener('DOMContentLoaded', fn);
					}
				}
				
				function makeSnow(el) {
					var ctx = el.getContext('2d');
					var width = 0;
					var height = 0;
					var particles = [];
					
					var Particle = function() {
						this.x = this.y = this.dx = this.dy = 0;
						this.reset();
					}
					
					Particle.prototype.reset = function() {
						this.y = Math.random() * height;
						this.x = Math.random() * width;
						this.dx = (Math.random() * 1) - 0.5;
						this.dy = (Math.random() * 0.5) + 0.5;
					}
					
					function createParticles(count) {
						if (count != particles.length) {
							particles = [];
							for (var i = 0; i < count; i++) {
								particles.push(new Particle());
							}
						}
					}
							
					function onResize() {
						width = window.innerWidth;
						height = window.innerHeight;
						el.width = width;
						el.height = height;
						
						createParticles((width * height) / 10000);
					}
					
					function updateParticles() {
						ctx.clearRect(0, 0, width, height);
						ctx.fillStyle = '#f6f9fa';
						
						particles.forEach(function(particle) {
							particle.y += particle.dy;
							particle.x += particle.dx;
							
							if (particle.y > height) {
								particle.y = 0;
							}
							
							if (particle.x > width) {
								particle.reset();
								particle.y = 0;
							}
							
							ctx.beginPath();
							ctx.arc(particle.x, particle.y, 5, 0, Math.PI * 2, false);
							ctx.fill();
						});
						
						window.requestAnimationFrame(updateParticles);
					}
					
					onResize();
					updateParticles();
					
					window.addEventListener('resize', onResize);
				}
				
				ready(function() {
					var canvas = document.getElementById('snow');
					makeSnow(canvas);
				});
			})();
		</script>
		<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?c8375f1ac141d4b69a5edf133f2cbaab";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值