Facebook spinner
by Andrey Izman
HTML
<div class="spinner-wrap spinner-blue">
<div class="d-flex justify-center">
<svg class="spinner-animate spinner-rotate" height="20" viewBox="0 0 20 20" width="20" aria-busy="true" aria-valuetext="Загрузка…" role="progressbar" tabindex="0">
<circle class="spinner-animate spinner-dash" cx="10" cy="10" r="9" stroke="var(--progress-ring-blue-foreground)"></circle>
</svg>
Loading ...
</div>
</div>
<svg class="spinner-animate spinner-rotate" height="20" viewBox="0 0 20 20" width="20" aria-busy="true" aria-valuetext="Загрузка…" role="progressbar" tabindex="0">
<circle class="spinner-animate spinner-dash" cx="10" cy="10" r="9" stroke="var(--progress-ring-blue-foreground)"></circle>
</svg>
CSS
:root {
--primary-text: #050505;
--progress-ring-neutral-background: rgba(255, 255, 255, 0.2);
--progress-ring-neutral-foreground: #ffffff;
--progress-ring-on-media-background: rgba(255, 255, 255, 0.2);
--progress-ring-on-media-foreground: #FFFFFF;
--progress-ring-blue-background: rgba(45, 136, 255, 0.2);
--progress-ring-blue-foreground: hsl(214, 100%, 59%);
--progress-ring-disabled-background: rgba(122, 125, 130, 0.2);
--progress-ring-disabled-foreground: #7A7D82;
}
body {
font-family: arial, sans-serif;
}
.spinner-wrap {
color: var(--primary-text);
}
.spinner-blue {
color: var(--progress-ring-blue-foreground);
}
.justify-center {
justify-content: center;
}
.d-flex {
display: flex;
}
.spinner-animate {
animation-duration: 2s;
animation-fill-mode: both;
animation-iteration-count: infinite;
transform-origin: 50% 50%;
}
.spinner-rotate {
animation-name: spinner-rotate;
animation-timing-function: cubic-bezier(0, 0, 1, 1);
outline: none;
}
.spinner-dash {
animation-name: spinner-dash;
animation-timing-function: cubic-bezier(.33, 0, .67, 1);
stroke-dasharray: 56.4564;
stroke-width: 2;
fill: none;
}
@keyframes spinner-dash {
0% {
stroke-dashoffset: 11.3;
transform: rotate(-90deg);
}
25% {
stroke-dashoffset: 50.9;
transform: rotate(162deg);
}
50% {
stroke-dashoffset: 25.4;
transform: rotate(72deg);
}
75% {
stroke-dashoffset: 50.9;
transform: rotate(162deg);
}
100% {
stroke-dashoffset: 11.3;
transform: rotate(-90deg);
}
}
@keyframes spinner-rotate {
0% {
transform: rotate(-90deg);
}
25% {
transform: rotate(90deg);
}
50% {
transform: rotate(270deg);
}
75% {
transform: rotate(450deg);
}
100% {
transform: rotate(990deg);
}
}