Skip to content

Instantly share code, notes, and snippets.

@GradientAnimator
Created May 24, 2024 13:32
Show Gist options
  • Save GradientAnimator/4659eea4dc84f4722c0be1b79c2dbf74 to your computer and use it in GitHub Desktop.
Save GradientAnimator/4659eea4dc84f4722c0be1b79c2dbf74 to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(115deg, #f02d0e, #a90000, #7a1b1b, #190101);
    background-size: 800% 800%;
    -webkit-animation: 27s ease infinite;
    -moz-animation: 27s ease infinite;
    -o-animation: 27s ease infinite;
    animation: 27s ease infinite;
}
@-webkit-keyframes {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
@-moz-keyframes {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
@-o-keyframes {
    0%{background-position:86% 0%}
    50%{background-position:15% 100%}
    100%{background-position:86% 0%}
}
@keyframes {
    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