使用css3完成圆形进度条加载动画

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{padding: 0;margin: 0;}
		body{background: #efefef;font-family:"microsoft yahei";color:#a1a1a1;}	
		.circleProgress-wrapper{width: 100px;height: 100px;margin: 50px auto;position: relative;text-align: center;line-height: 100px}
		.wrapper{width: 50%;height: 100px;position: absolute;overflow: hidden;}
		.right{right: 0}
		.left{left: 0}
		.circle{width: 90px;height: 90px;border:5px solid transparent;border-radius: 50%;}
		.circle-right{border-top-color:#f90;border-right-color:#f90;position: absolute;right: 0;transform:rotate(-135deg);animation:play1 2s linear forwards}
		.circle-left{border-bottom-color:#f90;border-left-color:#f90;position: absolute;left: 0;transform:rotate(225deg);animation:play2 2s ease-out 2s forwards}
		.text-area{font-size: 2em;}
		.title-text{font-style: normal;font-weight: bold;position: absolute;left: 0;right: 0;bottom: -65px;}
		@keyframes play1{
			0%{transform:rotate(-135deg);}
			100%{transform:rotate(45deg);}
		}
		@keyframes play2{
			0%{transform:rotate(225deg);}
			100%{transform:rotate(375deg);}
		}		
	</style>
</head>
<body>
	<div class="circleProgress-wrapper">
		<div class="wrapper right">
			<div class="circle circle-right"></div>
		</div>
		<div class="wrapper left">
			<div class="circle circle-left"></div>
		</div>	
		<span class="text-area">92%</span>
		<em class="title-text">HTML5+CSS3</em>	
	</div>
</body>
</html>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值