html+css制作圆形进度条

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012615439/article/details/79564166

使用html+css制作圆形进度条,

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		.circle-left{
			width:100px;
			height:100px;
			border-radius:50%;
			position:absolute;
			clip:rect(0 50px auto 0);
	    box-shadow: inset 0 0 0 2px #ff2d36;
	    left:0;
	    top:0;
	    transform:rotate(60deg);
		}
		.circle-right{
			width:100px;
			height:100px;
			border-radius:50%;
			position:absolute;
			clip:rect(0 auto auto 50px);
	    box-shadow: inset 0 0 0 2px #ff2d36;
	    left:0;
	    top:0;
		}
		.circle-box{
			position:relative;
			width:100px;
			height:100px;
			margin:100px auto;
		}
	</style>
</head>
<body>
	<div class="circle-box">
		<div class="circle-left"></div>
		<div class="circle-right"></div>
	</div>
</body>
</html>

主要使用css3的旋转以及css的clip样式;

clip:检索或设置对象的可视区域。区域外的部分是透明的。 必须将position的值设为absolute,此属性方可使用。 



猜你喜欢

转载自blog.csdn.net/u012615439/article/details/79564166