Skip to content

Instantly share code, notes, and snippets.

@wpacademy
Last active June 13, 2024 19:48
Show Gist options
  • Save wpacademy/aa5ad155b8d99f24b7c19721eea87fae to your computer and use it in GitHub Desktop.
Save wpacademy/aa5ad155b8d99f24b7c19721eea87fae to your computer and use it in GitHub Desktop.
Animated Gradient Text effect in CSS
h1 {
background: linear-gradient(
to right,
#CC98FF 20%,
#00affa 30%,
#0190cd 70%,
#FC96FF 80%
);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-fill-color: transparent;
background-size: 500% auto;
animation: animatedText 4s ease-in-out infinite alternate;
}
@keyframes animatedText {
0% {
background-position: 0% 50%;
}
100% {
background-position: 100% 50%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment