Last active
June 13, 2024 19:48
-
-
Save wpacademy/aa5ad155b8d99f24b7c19721eea87fae to your computer and use it in GitHub Desktop.
Animated Gradient Text effect in CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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