Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GradientAnimator/bb3721cb6c4f139d5de7b72099115478 to your computer and use it in GitHub Desktop.
Save GradientAnimator/bb3721cb6c4f139d5de7b72099115478 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(79deg, #000000, #984400, #000000, #67bbff);
    background-size: 800% 800%;
    -webkit-animation: AnimationName 38s ease infinite;
    -moz-animation: AnimationName 38s ease infinite;
    -o-animation: AnimationName 38s ease infinite;
    animation: AnimationName 38s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:50% 0%}
    50%{background-position:51% 100%}
    100%{background-position:50% 0%}
}
@-moz-keyframes AnimationName {
    0%{background-position:50% 0%}
    50%{background-position:51% 100%}
    100%{background-position:50% 0%}
}
@-o-keyframes AnimationName {
    0%{background-position:50% 0%}
    50%{background-position:51% 100%}
    100%{background-position:50% 0%}
}
@keyframes AnimationName {
    0%{background-position:50% 0%}
    50%{background-position:51% 100%}
    100%{background-position:50% 0%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment