Skip to content

Instantly share code, notes, and snippets.

@domnikl
Created February 7, 2022 20:48
Show Gist options
  • Save domnikl/3137e5b330bd88926785c5afc4419f09 to your computer and use it in GitHub Desktop.
Save domnikl/3137e5b330bd88926785c5afc4419f09 to your computer and use it in GitHub Desktop.
CSS animation to sweep background-colors
.whatever {
animation-name: color-transition;
animation-duration: 25s;
animation-direction: alternate;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes color-transition {
0% {
background-color: #4c6085;
border-color: #4c6085;
}
33% {
background-color: #80d39b;
border-color: #80d39b;
}
66% {
background-color: #be3e82;
border-color: #be3e82;
}
100% {
background-color: #4c6085;
border-color: #4c6085;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment