一、效果图

二、HTML代码


<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>3个圈</title>
</head>
<body>
	<div class="box">                <!-- box盒子只作为参考 -->
		<div class="box1"></div>
		<div class="box2"></div>
		<div class="box3"></div>
	</div>
</body>
</html>
三、CSS代码

	<style>
		*{
			padding: 0;
			margin:  0;
		}
		
		.box{
			width: 500px;
			height: 500px;
			/*border:1px solid #f40;*/
			position: absolute;
			top: 0;
		    left: 0;
		    right: 0;
		    bottom: 0;
		    margin:auto;     /*让父元素居中显示*/
		}
		.box1,
		.box2,
		.box3{
			float: left;
			margin-top:220px;
			margin-left: 48px;
			border-radius: 50%;
		}
		.box1{
            width: 100px;
			height: 100px;
			border:5px solid #f00;

		}
		.box2{
            width: 100px;
			height: 100px;
			border:5px solid #0f0;
		}
		.box3{
			width: 100px;
			height: 100px;
			border:5px solid #00f;
		}
	</style>

您已经阅读00:00:00欢迎留言评论,喜欢的话就为作者点个赞或者赏颗糖吧! 分享