Skip to content

Instantly share code, notes, and snippets.

@slavkapiyavka
Created June 27, 2023 15:24
Show Gist options
  • Save slavkapiyavka/8181d2d67d5db23dbd788de03da94f2b to your computer and use it in GitHub Desktop.
Save slavkapiyavka/8181d2d67d5db23dbd788de03da94f2b to your computer and use it in GitHub Desktop.
.animation {
animation: 4s linear 0s infinite alternate sun-rise;
}
@media (prefers-reduced-motion) {
.animation {
animation: none;
}
}
@keyframes sun-rise {
from {
/* pushes the sun down past the viewport */
transform: translateY(110vh);
}
to {
/* returns the sun to its default position */
transform: translateY(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment