Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CSS Gradient Animation
.css-selector {
    background: linear-gradient(133deg, #89533a, #902f02, #788a11, #0e694d);
    background-size: 800% 800%;
    -webkit-animation: AnimationName 20s ease infinite;
    -moz-animation: AnimationName 20s ease infinite;
    -o-animation: AnimationName 20s ease infinite;
    animation: AnimationName 20s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 27%}
    50%{background-position:100% 74%}
    100%{background-position:0% 27%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 27%}
    50%{background-position:100% 74%}
    100%{background-position:0% 27%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 27%}
    50%{background-position:100% 74%}
    100%{background-position:0% 27%}
}
@keyframes AnimationName {
    0%{background-position:0% 27%}
    50%{background-position:100% 74%}
    100%{background-position:0% 27%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment