Skip to content

Instantly share code, notes, and snippets.

@GradientAnimator
Created January 28, 2021 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GradientAnimator/52e43e833bb007cc6c1c61bf95e1989f to your computer and use it in GitHub Desktop.
Save GradientAnimator/52e43e833bb007cc6c1c61bf95e1989f to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(239deg, #0d57ec, #b90dec, #0dec3d, #a900f7);
    background-size: 800% 800%;
    -webkit-animation: AnimationName 51s ease infinite;
    -moz-animation: AnimationName 51s ease infinite;
    -o-animation: AnimationName 51s ease infinite;
    animation: AnimationName 51s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 83%}
    50%{background-position:100% 18%}
    100%{background-position:0% 83%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 83%}
    50%{background-position:100% 18%}
    100%{background-position:0% 83%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 83%}
    50%{background-position:100% 18%}
    100%{background-position:0% 83%}
}
@keyframes AnimationName {
    0%{background-position:0% 83%}
    50%{background-position:100% 18%}
    100%{background-position:0% 83%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment