Skip to content

Instantly share code, notes, and snippets.

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/495d5e34b77b92e962f2996512c22717 to your computer and use it in GitHub Desktop.
Save GradientAnimator/495d5e34b77b92e962f2996512c22717 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(213deg, #ff00df, #ff009b, #ffffff);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 38s ease infinite;
    -moz-animation: AnimationName 38s ease infinite;
    -o-animation: AnimationName 38s ease infinite;
    animation: AnimationName 38s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 13%}
    50%{background-position:100% 88%}
    100%{background-position:0% 13%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 13%}
    50%{background-position:100% 88%}
    100%{background-position:0% 13%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 13%}
    50%{background-position:100% 88%}
    100%{background-position:0% 13%}
}
@keyframes AnimationName {
    0%{background-position:0% 13%}
    50%{background-position:100% 88%}
    100%{background-position:0% 13%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment