css雷达扫码效果

css雷达扫码效果
HTML代码

		<ul class="ladar">
			<!-- 四条线 -->
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<!-- 三个内圆 -->
			<li></li>
			<li></li>
			<li></li>
			<!-- 扫描线 -->
			<li></li>
		</ul>
css样式
*{
	margin:0;
	padding:0;
}
body{
	background: url(./map.jpg);
	
}
.ladar{
	position: absolute;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	width:480px;
	height:480px;
	background: url(./map.jpg);
	background-size: cover;
	border-radius: 100%;
	border:20px solid #fff;
	box-shadow: 0 0 20px #262626,inset 0 0 80px #0f0;
	overflow: hidden;
	
}
/* 四条线 */
.ladar li:nth-child(1),
.ladar li:nth-child(2),
.ladar li:nth-child(3),
.ladar li:nth-child(4){
	list-style: none;
	position: absolute;
	top:50%;
	width:100%;
	height:2px;
	background: rgba(0,255,0,.8);
}
.ladar li:nth-child(1){
	transform: rotate(0deg);
}
.ladar li:nth-child(2){
	transform: rotate(45deg);
}
.ladar li:nth-child(3){
	transform: rotate(90deg);
}
.ladar li:nth-child(4){
	transform: rotate(-45deg);
}
/* 三个内圆 */
.ladar li:nth-child(5){
	position: absolute;
	list-style: none;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	width:120px;
	height:120px;
	border-radius: 50%;
	border:2px solid #0f0;
}
.ladar li:nt*{
	margin:0;
	padding:0;
}
body{
	background: url(./map.jpg);
	
}
.ladar{
	position: absolute;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	width:480px;
	height:480px;
	background: url(./map.jpg);
	background-size: cover;
	border-radius: 100%;
	border:20px solid #fff;
	box-shadow: 0 0 20px #262626,inset 0 0 80px #0f0;
	overflow: hidden;
	
}
/* 四条线 */
.ladar li:nth-child(1),
.ladar li:nth-child(2),
.ladar li:nth-child(3),
.ladar li:nth-child(4){
	list-style: none;
	position: absolute;
	top:50%;
	width:100%;
	height:2px;
	background: rgba(0,255,0,.8);
}
.ladar li:nth-child(1){
	transform: rotate(0deg);
}
.ladar li:nth-child(2){
	transform: rotate(45deg);
}
.ladar li:nth-child(3){
	transform: rotate(90deg);
}
.ladar li:nth-child(4){
	transform: rotate(-45deg);
}
/* 三个内圆 */
.ladar li:nth-child(5){
	position: absolute;
	list-style: none;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	width:120px;
	height:120px;
	border-radius: 50%;
	border:2px solid #0f0;
}
.ladar li:nth-child(6){
	position: absolute;
	list-style: none;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	width:240px;
	height:240px;
	border-radius: 50%;
	border:2px solid #0f0;
}
.ladar li:nth-child(7){
	position: absolute;
	list-style: none;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	width:360px;
	height:360px;
	border-radius: 50%;
	border:2px solid #0f0;
}
/* 扫描线 */
.ladar li:nth-child(8){
	list-style: none;
	position: absolute;
	top:50%;
	left:50%;
	width:50%;
	height:50%;
	
	/* background: #fff; */
	transform-origin: top left;
	animation: line_r 2s linear infinite;
	background:linear-gradient(45deg,#0f0 0%,transparent 50%);
}
@keyframes line_r{
	from{
		transform: rotate(0deg);
	}
	to{
		transform: rotate(360deg);
	}
}
/* 点 */
.ladar::before{
	content: '';
	position: absolute;
	width:20px;
	height: 20px;
	left: 40%;
	top:50%;
	border-radius: 50%;
	background: #0f0;
	filter: blur(20px);
	animation: light1 2s linear infinite;
	filter: blur(2px);
}
.ladar::after{
	content: '';
	position: absolute;
	width:20px;
	height: 20px;
	left: 60%;
	top:60%;
	border-radius: 50%;
	background: #0f0;
	filter: blur(2px);
	animation: light2 2s linear infinite;
}
@keyframes light1{
	from{
		opacity: 1;
	}
	to{
		opacity: .5;
	}
}
@keyframes light2{
	from{
		opacity: .5;
	}
	to{
		opacity: 1;
	}
}

参考代码:https://codechina.csdn.net/qq_38870145/css_study/-/tree/master/day30

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

susan花雨

你的鼓励将是我创作的最大动力

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

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

打赏作者

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

抵扣说明:

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

余额充值