SOURCE

console 命令行工具 X clear

                    
>
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: both; */
    animation-fill-mode: forwards;
    animation-delay: .5s;
}
.circle:hover .right-ring{
    animation: leftRotate .5s linear;
    /* animation-fill-mode: both; */
    animation-fill-mode: forwards;
}
.right-circle{
    width: 120px;
    height: 240px;
    /* background-color: skyblue; */
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
}
.left-ring{
    /* content: ""; */
    /* transition: all .5s; */
    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);
    /* animation: rightRotate .5s linear;
    animation-fill-mode: forwards;
    animation-delay: .5s;
    animation-direction: alternate; */
    left: 0;
    top: 0;
    
}
@keyframes rightRotate{
    0%{
        transform: rotate(-135deg);
    }
    100%{
        transform: rotate(45deg);
    }
}
.left-circle{
    width: 120px;
    height: 240px;
    /* background-color: lightsalmon; */
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}
 .right-ring{
    /* content: ""; */
    position: absolute;
    width: 240px;
    height: 240px;
    box-sizing: border-box;
    /* background-color: red; */
    border: 5px solid skyblue;
    right: 0;
    top: 0;
    border-radius: 50%;
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(45deg);
    /* animation-direction:alternate-reverse;
    animation: leftRotate .5s linear;
    animation-fill-mode: forwards; */
}

@keyframes leftRotate{
    0%{
        transform: rotate(45deg);
    }
    100%{
        transform: rotate(225deg);
    }
}