JSFiddle - React, Tailwind, and code Playground

HTML

<div class="spinner">
    <div class="bg"></div>
    <div class="one"></div>
    <div class="two"></div>
</div>

CSS

body {
    background-color: #333;
}
.spinner {
    position: relative;
}
.bg {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 58px;
    border: 8px solid #ddd;
    -webkit-animation: fade 5s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
}
.one, .two {
    position: absolute;
    border: 8px solid #dd0000;
    border-radius: 66px;
    height: 100px;
    width: 100px;
    clip: rect(0, 116px, 58px, 0px);
}
.one {
    -webkit-animation:rotate-one 5s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
}
.two {
    border-color: #00dd00;
    -webkit-animation:rotate-two 5s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
}
@-webkit-keyframes fade {
    0% {
        opacity: .2;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: .2;
    }
}
@-webkit-keyframes rotate-one {
    0% {
        -webkit-transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}
@-webkit-keyframes rotate-two {
    0% {
        -webkit-transform: rotate(360deg);
    }
    100% {
        -webkit-transform: rotate(0);
    }
}