Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GradientAnimator/a871153927545a77d01528b36cc1fa9f to your computer and use it in GitHub Desktop.
Save GradientAnimator/a871153927545a77d01528b36cc1fa9f to your computer and use it in GitHub Desktop.
CSS Gradient Animation
.css-selector {
    background: linear-gradient(160deg, #ff4ff5, #ca63ff, #f74a4a, #ffefef);
    background-size: 800% 800%;
    -webkit-animation: racer161Background 8s ease infinite;
    -moz-animation: racer161Background 8s ease infinite;
    -o-animation: racer161Background 8s ease infinite;
    animation: racer161Background 8s ease infinite;
}
@-webkit-keyframes racer161Background {
    0%{background-position:82% 0%}
    50%{background-position:19% 100%}
    100%{background-position:82% 0%}
}
@-moz-keyframes racer161Background {
    0%{background-position:82% 0%}
    50%{background-position:19% 100%}
    100%{background-position:82% 0%}
}
@-o-keyframes racer161Background {
    0%{background-position:82% 0%}
    50%{background-position:19% 100%}
    100%{background-position:82% 0%}
}
@keyframes racer161Background {
    0%{background-position:82% 0%}
    50%{background-position:19% 100%}
    100%{background-position:82% 0%}
}
@racer161
Copy link

racer161 commented Nov 5, 2020

Made a quick animated background from my twitch stream

@racer161
Copy link

racer161 commented Nov 5, 2020

Thanks GradientAnimator!

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