简单八卦图的实现

<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>八卦图</title>
	<style>
	.box{
		height: 300px;
		width: 400px;
		background: rgba(51,102,205,0.8);
		margin: 100px auto;
		position: relative;
		
	}
	.box1{
		height: 200px;
		width: 200px;
		background: black;
		border-radius: 50%;
		position: absolute;
        border: 5px solid rgba(255,255,254,0.8);
		left: 50%;
		top: 50%;
		transform:translate(-50%,-50%);
        display: none;
	}
    .box1_1{
    	height: 100px;
    	width: 200px;
    	border-radius: 100px 100px 0 0;
    	background: white;
    	/*border: 1px solid;*/
    }
    .box1_2{
    	height: 100px;
    	width: 100px;
    	background: white;
    	position: absolute;
        right: 0;
        top: 50px;
        border-radius: 50%;
        /*border: 1px solid;*/
    }
    .box1_3{
    	height: 100px;
    	width: 100px;
    	background: black;
    	position: absolute;
        left: 0;
        top: 50px;
        border-radius: 50%;
    }
    .box2{
    	height: 50px;
    	width: 50px;
    	background: black;
    	position: absolute;
    	right: 0;
    	top: 50%;
    	transform:translate(-50%,-50%);
    	border-radius: 50%;
    }
    .box3{
    	height: 50px;
    	width: 50px;
    	background: white;
    	position: absolute;
    	/*left: 0;
    	top: 0;*/
    	transform:translate(50%,50%);
    	border-radius: 50%;

    }
	</style>
</head>
<body>
	<div class="box">
		<div class="box1">
			<div class="box1_1"></div>
			<div class="box1_2">
				<div class="box2"></div>
			</div>
			<div class="box1_3">
				<div class="box3"></div>
            </div>
		</div>
	</div>
    <script src="js/jquery-1.12.4.js"></script>
    <script type="text/javascript">
    $(function(){
        $(".box1").show(2000);
    })
    </script>
</body>
</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值