Last active
January 31, 2024 06:07
-
-
Save frikishaan/c9d525ef675bbd52fb4d206207bcfa25 to your computer and use it in GitHub Desktop.
CSS Text background animation
This file contains 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
/* | |
* Create an element with class 'hero-text' | |
* | |
*/ | |
.hero-text { | |
background: radial-gradient(circle, #0284c7, #ca8a04); | |
background-clip: text; | |
color: transparent; | |
background-size: 200% 200%; | |
animation: hero-text 15s linear infinite; | |
} | |
@keyframes hero-text { | |
0% { | |
background-position: 0% 0%; | |
} | |
50% { | |
background-position: 100% 100%; | |
} | |
100% { | |
background-position: 0% 0%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment