码迷,mamicode.com
首页 > 其他好文 > 详细

太极图----三层div实现(非伪类)

时间:2017-01-24 14:34:26      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:pad   太极   tin   伪类   utf-8   body   styles   har   ase   

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>太极</title>
<style class="cp-pen-styles">
*{
padding:0;
margin:0;
}
.outer{
background: linear-gradient(to bottom,white 50%,black 50%);
margin:100px auto;
width:400px;
height:400px;
border-radius: 50%;
position:relative;
border:1px solid black;
transition: all 5s ease;
}
.outer:hover{
transform: rotate(360deg) scale(2);
}
.outer .left{
background: white;
width:200px;
height:200px;
border-radius: 50%;
position:absolute;
left: 0;
top:100px;
}
.outer .left .leftInner{
background: black;
width:80px;
height:80px;
border-radius: 50%;
position:absolute;
left: 60px;
top:60px;
}
.outer .right{
background: black;
width:200px;
height:200px;
border-radius: 50%;
position:absolute;
right: 0;
top:100px;
}
.outer .right .rightInner{
background: white;
width:80px;
height:80px;
border-radius: 50%;
position:absolute;
left:60px;
top:60px;
}
</style>
</head>
<body>
<div class="outer">
<div class="left">
<div class="leftInner"></div>
</div>
<div class="right">
<div class="rightInner"></div>
</div>
</div>
</body>
</html>

太极图----三层div实现(非伪类)

标签:pad   太极   tin   伪类   utf-8   body   styles   har   ase   

原文地址:http://www.cnblogs.com/qiancheng123/p/6347006.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!