Skip to content

Instantly share code, notes, and snippets.

@GradientAnimator
Created September 7, 2022 13:30
Show Gist options
  • Save GradientAnimator/d37008a7cee87e779be1773196b66a83 to your computer and use it in GitHub Desktop.
Save GradientAnimator/d37008a7cee87e779be1773196b66a83 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(228deg, #2e45c2, #d60141, #2e45c2);
    background-size: 600% 600%;
    -webkit-animation: Purple 17s ease infinite;
    -moz-animation: Purple 17s ease infinite;
    -o-animation: Purple 17s ease infinite;
    animation: Purple 17s ease infinite;
}
@-webkit-keyframes Purple {
    0%{background-position:72% 0%}
    50%{background-position:29% 100%}
    100%{background-position:72% 0%}
}
@-moz-keyframes Purple {
    0%{background-position:72% 0%}
    50%{background-position:29% 100%}
    100%{background-position:72% 0%}
}
@-o-keyframes Purple {
    0%{background-position:72% 0%}
    50%{background-position:29% 100%}
    100%{background-position:72% 0%}
}
@keyframes Purple {
    0%{background-position:72% 0%}
    50%{background-position:29% 100%}
    100%{background-position:72% 0%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment