CSS
.clock {
width: 52px;
height: 52px;
border-radius: 50%;
border: 3px solid rgba(124, 108, 255, 0.25);
position: relative;
}
.clock::before,
.clock::after {
content: "";
position: absolute;
border-radius: 2px;
}
.clock::before {
width: 2px;
height: 22px;
background: #7c6cff;
top: 4px;
left: 50%;
margin-left: -1px;
transform-origin: bottom center;
animation: chour 6s linear infinite;
}
.clock::after {
width: 2px;
height: 16px;
background: #ff6c8a;
top: 10px;
left: 50%;
margin-left: -1px;
transform-origin: bottom center;
animation: cmin 1s linear infinite;
}
@keyframes chour {
to {
transform: rotate(360deg);
}
}
@keyframes cmin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.clock,
.clock * {
animation: none !important;
}
}