html实现太极图效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>阴阳</title>
<style>
.yinyang {
width: 200px;
height: 99px;
border:1px solid #000;
border-bottom-width: 100px;
border-radius: 100px;
position: relative;
cursor: pointer;
transition: 100s;
}
.yinyang:hover {
/*旋转*/
transform: rotate(200000deg);
}
.yinyang:before {
content: "";
position: absolute;
width: 20px;
height: 20px;
border:40px solid #000;
left: 0;
top: 50px;
border-radius: 50px;
background: #fff;
}
.yinyang:after {
content: "";
position: absolute;
width: 20px;
height: 20px;
border:40px solid #fff;
right: 0;
top: 50px;
border-radius: 50px;
background: #000;
}
</style>
</head>
<body>
<div class="yinyang"></div>
</body>
</html>
本文来自博客园,作者:JackieDYH,转载请注明原文链接:https://www.cnblogs.com/JackieDYH/p/17634883.html