Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GradientAnimator/ad4ce3941bdddedbacb3c1482d17c689 to your computer and use it in GitHub Desktop.
Save GradientAnimator/ad4ce3941bdddedbacb3c1482d17c689 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(221deg, #2ac09a, #0f4537, #020202);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 30s ease infinite;
    -moz-animation: AnimationName 30s ease infinite;
    -o-animation: AnimationName 30s ease infinite;
    animation: AnimationName 30s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 84%}
    50%{background-position:100% 17%}
    100%{background-position:0% 84%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 84%}
    50%{background-position:100% 17%}
    100%{background-position:0% 84%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 84%}
    50%{background-position:100% 17%}
    100%{background-position:0% 84%}
}
@keyframes AnimationName {
    0%{background-position:0% 84%}
    50%{background-position:100% 17%}
    100%{background-position:0% 84%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment