Skip to content

Instantly share code, notes, and snippets.

@GradientAnimator
Created June 18, 2021 23:58
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/fe2810684f1a31a35a02ff1fcf551616 to your computer and use it in GitHub Desktop.
Save GradientAnimator/fe2810684f1a31a35a02ff1fcf551616 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(225deg, #e7d533, #8b367c);
    background-size: 400% 400%;
    -webkit-animation: Gradient 37s ease infinite;
    -moz-animation: Gradient 37s ease infinite;
    -o-animation: Gradient 37s ease infinite;
    animation: Gradient 37s ease infinite;
}
@-webkit-keyframes Gradient {
    0%{background-position:90% 0%}
    50%{background-position:11% 100%}
    100%{background-position:90% 0%}
}
@-moz-keyframes Gradient {
    0%{background-position:90% 0%}
    50%{background-position:11% 100%}
    100%{background-position:90% 0%}
}
@-o-keyframes Gradient {
    0%{background-position:90% 0%}
    50%{background-position:11% 100%}
    100%{background-position:90% 0%}
}
@keyframes Gradient {
    0%{background-position:90% 0%}
    50%{background-position:11% 100%}
    100%{background-position:90% 0%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment