<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>太极图</title>
<style>
*{margin: 0;padding: 0;}
.circlebox{
width: 300px;
height: 300px;
margin: 200px auto;
position: relative;
animation:move 5.5s infinite linear ;
}
.circleblack{
width: 300px;
height:300px;
background-color:black;
border-radius: 50%;
}
.circlewhite{
width: 150px;
height: 300px;
background-color:rgb(255, 255, 255);
border-top-right-radius: 150px;
border-bottom-right-radius:150px;
position: absolute;
top: 0;
right:0;
}
.circleww{
width: 150px;
height: 150px;
background-color: rgb(255, 255, 255);
border-radius:50%;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%,0);
}
.circlebb{
width:150px;
height:150px;
background-color:black;
border-radius:50%;
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%,0);
}
.circlewww{
background-color: white;
width: 20px;
height: 20px;
position: absolute;
bottom: 25%;
left: 50%;
border-radius: 50%;
}
.circlebbb{
background-color: black;
width: 20px;
height: 20px;
position: absolute;
top: 25%;
left: 50%;
transform: translate(-50%,-50%);
border-radius: 50%;
}
@keyframes move{
from{
transform: rotate(0deg);
}
to{
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="circlebox">
<div class="circleblack"></div>
<div class="circlewhite"></div>
<div class="circlebb"></div>
<div class="circleww"></div>
<div class="circlewww"></div>
<div class="circlebbb"></div>
</div>
</body>
</html>
太极图实现
最新推荐文章于 2023-07-20 00:04:48 发布