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/d3b2c5e0e39957fb701b33f55c543328 to your computer and use it in GitHub Desktop.
Save GradientAnimator/d3b2c5e0e39957fb701b33f55c543328 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(234deg, #29362c, #dbbd2e, #96694a, #111514, #98b9c9);
    background-size: 1000% 1000%;
    -webkit-animation: AnimationName 24s ease infinite;
    -moz-animation: AnimationName 24s ease infinite;
    -o-animation: AnimationName 24s ease infinite;
    animation: AnimationName 24s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 68%}
    50%{background-position:100% 33%}
    100%{background-position:0% 68%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 68%}
    50%{background-position:100% 33%}
    100%{background-position:0% 68%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 68%}
    50%{background-position:100% 33%}
    100%{background-position:0% 68%}
}
@keyframes AnimationName {
    0%{background-position:0% 68%}
    50%{background-position:100% 33%}
    100%{background-position:0% 68%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment