Skip to content

Instantly share code, notes, and snippets.

@GradientAnimator
Created October 30, 2020 14:14
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/fd18440187e9e04ba74a73a390f5246a to your computer and use it in GitHub Desktop.
Save GradientAnimator/fd18440187e9e04ba74a73a390f5246a to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(134deg, #06f7b9, #386157);
    background-size: 400% 400%;
    -webkit-animation: AnimationName 0s ease infinite;
    -moz-animation: AnimationName 0s ease infinite;
    -o-animation: AnimationName 0s ease infinite;
    animation: AnimationName 0s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
@-moz-keyframes AnimationName {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
@-o-keyframes AnimationName {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
@keyframes AnimationName {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment