Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GradientAnimator/9e800bcf5bd58c55ce81fe8e063143f6 to your computer and use it in GitHub Desktop.
Save GradientAnimator/9e800bcf5bd58c55ce81fe8e063143f6 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(52deg, #f51cc7, #f8960d, #97f80d, #0daef8, #0df8b6);
    background-size: 1000% 1000%;
    -webkit-animation: AnimationName 14s ease infinite;
    -moz-animation: AnimationName 14s ease infinite;
    -o-animation: AnimationName 14s ease infinite;
    animation: AnimationName 14s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 90%}
    50%{background-position:100% 11%}
    100%{background-position:0% 90%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 90%}
    50%{background-position:100% 11%}
    100%{background-position:0% 90%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 90%}
    50%{background-position:100% 11%}
    100%{background-position:0% 90%}
}
@keyframes AnimationName {
    0%{background-position:0% 90%}
    50%{background-position:100% 11%}
    100%{background-position:0% 90%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment