流星雨特效css3

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
				box-sizing: border-box;
			}
			body{
				overflow: hidden;
			}
			section{
				position: absolute;
				top: 0;
				left: 0;
                width: 100%;
				height: 100vh;
				background: url(img/xingkong.jpg);
				background-position-x: center;
				background-size: cover;
				animation:  animateBg  5s  linear  infinite;
			}
			
			@keyframes animateBg{
				0%,100%{
					transform: scale(1);
				}
				50%{
					/* transform: scale(1.2); */
				}
			}
			
			span{
				position: absolute;
				top:50%;
				left:50%;
				width: 4px;
				height: 4px;
				background: #FFFFFF;
				border-radius: 50%;
				box-shadow: 0 0 0 4px  
				rgba(255,255,255,0.1),0 0 0 8px 
				rgba(255,255,255,0.1),0 0 20px 
				 rgba(255,255,255,1); 
				 animation: animate  3s  linear  infinite;
			}
			@keyframes animate{
				0%{
					transform: rotate(315deg)  translateX(-100px);
					opacity: 1;
				}
				70%{
					opacity: 1;
				}
				100%{
					transform:rotate(315deg)   translateX(-1000px);
					opacity:0;
				}
			}
			span::before{
				content: '';
				position: absolute;
				top:50%;
				transform: translateX(-50%);
				width: 200px;
				height: 1px;
				background: linear-gradient(90deg,#fff,transparent);
			}
			span:nth-child(1){
				top:0;
				right:0;
				left:initial;
				animation-delay: 0;
				animation-duration: 1s;
			}
			span:nth-child(2){
				top:0;
				right:80px;
				left:initial;
				animation-delay: 0.2s;
				animation-duration: 1s;
			}
			span:nth-child(3){
				top:80px;
				right:0px;
				left:initial;
				animation-delay: 0.4s;
				animation-duration: 2s;
			}
			span:nth-child(4){
				top:0;
				right:180px;
				left:initial;
				animation-delay: 0.6s;
				animation-duration: 1.5s;
			}
			span:nth-child(5){
				top:0;
				right:400px;
				left:initial;
				animation-delay: 0.8s;
				animation-duration: 2.5s;
			}
			span:nth-child(6){
				top:0;
				right:600px;
				left:initial;
				animation-delay: 1s;
				animation-duration: 3s;
			}
			span:nth-child(7){
				top:300px;
				right:0px;
				left:initial;
				animation-delay: 1.2s;
				animation-duration: 1.75s;
			}
			span:nth-child(8){
				top:0;
				right:700px;
				left:initial;
				animation-delay: 1.4s;
				animation-duration: 1.25s;
			}
			span:nth-child(9){
				top:0;
				right:900px;
				left:initial;
				animation-delay: 1.6s;
				animation-duration: 1s;
			}
			span:nth-child(10){
				top:0;
				right:110px;
				left:initial;
				animation-delay: 2.2s;
				animation-duration: 1.54s;
			}
		</style>
	</head>
	<body>
		<section>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
			<span class="span"></span>
		</section>
	</body>
</html>

x效果图:在这里插入图片描述

  • 2
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

你的美,让我痴迷

你的好,我会永远记住你的。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值