太极图的制作
代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.yy {
width: 200px;
height: 99px;
border: 1px solid #000;
border-bottom-width: 100px;
border-radius:100px;
position:relative;
cursor: pointer;/*抓手*/
transition: all 1s linear; /*过渡*/
}
.yy:hover{
transform:rotate(360deg);
}
.yy:before {
content: "";
position: absolute;
top:50px;
left:0;
width: 20px;
height: 20px;
border:40px solid #000;
border-radius: 50px;
background: #fff;
}
.yy:after {
content: "";
width: 20px;
height: 20px;
position: absolute;
top: 50px;
right: 0;
border: 40px solid #fff;
border-radius: 50px;
background: #000;
}
</style>
</head>
<body>
<div class="yy"></div>
</body>
</html>
显示效果:
(ps:会动的太极图)