console
<div class="circle">
<div class="right-circle">
<div class="right-ring"></div>
</div>
<div class="left-circle">
<div class="left-ring"></div>
</div>
</div>
.circle {
width: 240px;
height: 240px;
background-color: lightcoral;
left: 50px;
top: 50px;
position: absolute;
}
.circle:hover .left-ring{
animation: rightRotate .5s linear;
animation-fill-mode: forwards;
animation-delay: .5s;
}
.circle:hover .right-ring{
animation: leftRotate .5s linear;
animation-fill-mode: forwards;
}
.right-circle{
width: 120px;
height: 240px;
position: absolute;
top: 0;
right: 0;
overflow: hidden;
}
.left-ring{
width: 240px;
height: 240px;
position: absolute;
box-sizing: border-box;
border-radius: 50%;
border: 5px solid skyblue;
border-top-color: transparent;
border-right-color: transparent;
transform: rotate(-135deg);
left: 0;
top: 0;
}
@keyframes rightRotate{
0%{
transform: rotate(-135deg);
}
100%{
transform: rotate(45deg);
}
}
.left-circle{
width: 120px;
height: 240px;
position: absolute;
top: 0;
left: 0;
overflow: hidden;
}
.right-ring{
position: absolute;
width: 240px;
height: 240px;
box-sizing: border-box;
border: 5px solid skyblue;
right: 0;
top: 0;
border-radius: 50%;
border-right-color: transparent;
border-top-color: transparent;
transform: rotate(45deg);
}
@keyframes leftRotate{
0%{
transform: rotate(45deg);
}
100%{
transform: rotate(225deg);
}
}