Gyroscope
Ring · Double · colorful, playful
HTML
<div class="utw-loader-gyroscope" role="status"> <span class="utw-loader-gyroscope__outer"></span> <span class="utw-loader-gyroscope__inner"></span> <span class="utw-loader-gyroscope__sr">Loading…</span> </div>
CSS
/* Ring loader (Double) */
.utw-loader-gyroscope {
box-sizing: border-box;
position: relative;
display: inline-block;
width: 56px;
height: 56px;
}
.utw-loader-gyroscope *,
.utw-loader-gyroscope *::before,
.utw-loader-gyroscope *::after {
box-sizing: border-box;
}
.utw-loader-gyroscope__outer {
position: absolute;
inset: 0;
border: 4px solid transparent;
border-top-color: #f43f5e;
border-bottom-color: #f43f5e;
border-radius: 50%;
animation: utw-loader-gyroscope-spin 1.2s linear infinite;
}
.utw-loader-gyroscope__inner {
position: absolute;
inset: 14px;
border: 4px solid transparent;
border-left-color: #3b82f6;
border-right-color: #3b82f6;
border-radius: 50%;
animation: utw-loader-gyroscope-spin 0.9s linear infinite reverse;
}
.utw-loader-gyroscope__sr {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@keyframes utw-loader-gyroscope-spin {
to {
transform: rotate(360deg);
}
}
@keyframes utw-loader-gyroscope-calm {
from {
opacity: 1;
}
to {
opacity: 0.5;
}
}
@media (prefers-reduced-motion: reduce) {
.utw-loader-gyroscope *,
.utw-loader-gyroscope *::before,
.utw-loader-gyroscope *::after {
animation: none !important;
}
.utw-loader-gyroscope {
animation: utw-loader-gyroscope-calm 2s ease-in-out infinite alternate !important;
}
}