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/e9047ba4ecc581801bd73feb03189df6 to your computer and use it in GitHub Desktop.
Save GradientAnimator/e9047ba4ecc581801bd73feb03189df6 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(293deg, #2890d1, #906df2, #a2cdf4, #3c95e5);
    background-size: 800% 800%;
    -webkit-animation: login-bg-animation 14s ease infinite;
    -moz-animation: login-bg-animation 14s ease infinite;
    -o-animation: login-bg-animation 14s ease infinite;
    animation: login-bg-animation 14s ease infinite;
}
@-webkit-keyframes login-bg-animation {
    0%{background-position:0% 50%}
    50%{background-position:100% 51%}
    100%{background-position:0% 50%}
}
@-moz-keyframes login-bg-animation {
    0%{background-position:0% 50%}
    50%{background-position:100% 51%}
    100%{background-position:0% 50%}
}
@-o-keyframes login-bg-animation {
    0%{background-position:0% 50%}
    50%{background-position:100% 51%}
    100%{background-position:0% 50%}
}
@keyframes login-bg-animation {
    0%{background-position:0% 50%}
    50%{background-position:100% 51%}
    100%{background-position:0% 50%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment