Skip to content

Commit 5b986aa

Browse files
committed
hero text color animation
1 parent 991b1d0 commit 5b986aa

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/components/AltHeroSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const AltHeroSection = () => {
55
return (
66
<div className="flex flex-col items-center justify-center">
77
<div className="my-16 flex flex-col items-center px-3 pb-6 sm:mb-20 sm:mt-20">
8-
<h1 className="mb-16 text-center text-5xl font-black md:w-3/4 md:text-7xl lg:text-9xl dark:text-primary-400">
8+
<h1 className="animate-text mb-16 bg-gradient-to-r from-primary-600 via-rose-500 to-primary-600 bg-clip-text text-center text-5xl font-black text-transparent md:w-3/4 md:text-7xl lg:text-9xl">
99
FullStack Web Developer
1010
</h1>
1111
<p className="text-center text-xl text-dark-900 dark:text-white">

tailwind.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default {
4444
slideUp: 'slideUp 0.5s ease-in-out forwards',
4545
slideLeft: 'slideLeft 0.5s ease-in-out forwards',
4646
fadeIn: 'fadeIn 0.5s ease-in-out forwards',
47+
text: 'text 5s ease infinite alternate',
4748
},
4849
keyframes: {
4950
slideUp: {
@@ -61,6 +62,16 @@ export default {
6162
'0%': { opacity: 0, transform: 'scale(0.5)' },
6263
'100%': { opacity: 1, transform: 'scale(1)' },
6364
},
65+
text: {
66+
'0%, 100%': {
67+
backgroundSize: '200% 200%',
68+
backgroundPosition: 'left center',
69+
},
70+
'50%': {
71+
backgroundSize: '200% 200%',
72+
backgroundPosition: 'right center',
73+
},
74+
},
6475
},
6576
},
6677
container: {

0 commit comments

Comments
 (0)