Skip to content

Instantly share code, notes, and snippets.

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/74e6231e6afa28c7511be99d70a26b10 to your computer and use it in GitHub Desktop.
Save GradientAnimator/74e6231e6afa28c7511be99d70a26b10 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(270deg, #ffe79b, #c4fffd, #ffb5b5);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 19s ease infinite;
    -moz-animation: AnimationName 19s ease infinite;
    -o-animation: AnimationName 19s ease infinite;
    animation: AnimationName 19s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 52%}
    50%{background-position:100% 49%}
    100%{background-position:0% 52%}
}
@-moz-keyframes AnimationName {
    0%{background-position:0% 52%}
    50%{background-position:100% 49%}
    100%{background-position:0% 52%}
}
@-o-keyframes AnimationName {
    0%{background-position:0% 52%}
    50%{background-position:100% 49%}
    100%{background-position:0% 52%}
}
@keyframes AnimationName {
    0%{background-position:0% 52%}
    50%{background-position:100% 49%}
    100%{background-position:0% 52%}
}
@20sw084
Copy link

20sw084 commented Apr 26, 2024

My First Gradient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment