<input type="checkbox" id="slowmo" />
<label for="slowmo">Slowmo!</label>
<div>🐶</div>
body { font-size: 32px; }
input { height: 32px; width: 32px; }
div { font-size: 64px; width: fit-content; }
div {
animation-name: spin;
animation-delay: 0s;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
#slowmo:checked ~ div {
animation-duration: 1.5s;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.