console
<div>
<span></span>
<span></span>
</div>
body{
height: 90vh;
display: flex;
justify-content: center;
align-items: center;
}
div{
width: 300px;
height:300px;
border-radius: 50%;
background: linear-gradient(to right, #000 50%, #fff 50%);
position: relative;
box-shadow: 0 0 8px #ccc;
transform: rotate(0deg);
animation: rotate linear 2.5s infinite;
}
@keyframes rotate {
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(1turn);
}
}
div::before,
div::after{
content: '';
width: 150px;
height: 150px;
border-radius: 50%;
position: absolute;
}
div::before{
left: 75px;
top: 0;
background: #000;
}
div::after{
bottom: 0;
left: 75px;
background: #fff;
}
div > span{
width: 50px;
height: 50px;
border-radius: 50%;
position: absolute;
}
div>span:nth-child(1){
top: 50px;
left: 125px;
background: #fff;
}
div>span:nth-child(2){
bottom: 50px;
left: 125px;
background: #000;
z-index: 1;
}