JSFiddle - React, Tailwind, and code Playground
by Ed Bulikyan
HTML
<div class="loader"></div>
SCSS
@keyframes speen {
to {
transform: rotate(360deg);
}
}
$size: 60px;
$border-size: 5px;
.loader {
position: relative;
width: $size;
height: $size;
border: $border-size solid red;
border-radius: 50%;
/* animation: speen 1s infinite; */
}
.loader:before {
position: absolute;
left: 50%;
top: 0;
content: '';
border-radius: 0 $size / 2 0 0;
margin-top: -$border-size;
margin-right: -$border-size;
width: $size / 2 + $border-size;
height: $size / 2 + ;
background-color: #0ff;
}