效果图
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200210211212604.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM2OTkwMzIy,size_16,color_FFFFFF,t_70)
html
<div className="circle-box">
<div className="circle">
<div className="white" />
<div className="black" />
</div>
</div>
less
.circle-box {
// transform: rotateX(102deg);
position: absolute;
top: 0;
left: 0;
.circle {
width: 500px;
height: 500px;
border-radius: 50%;
animation: Rotate 5s linear infinite;
transform-origin: center center center;
overflow: hidden;
position: relative;
&::after {
content: "";
display: block;
height: 250px;
background-color: #fff;
}
&::before {
content: "";
display: block;
height: 250px;
background-color: #000;
}
>div {
position: absolute;
width: 250px;
height: 250px;
border-radius: 50%;
top: 125px;
}
.white {
left: 0;
background-color: #fff;
&::after {
position: absolute;
top: 100px;
left: 100px;
content: "";
display: block;
height: 50px;
width: 50px;
border-radius: 50%;
background-color: #000;
}
}
.black {
right: 0;
background-color: #000;
&::after {
position: absolute;
top: 100px;
left: 100px;
content: "";
display: block;
height: 50px;
width: 50px;
border-radius: 50%;
background-color: #fff;
}
}
}
}