19
Beautify Your Text With CSS Gradients!
Here's how to add a gradient to your text to create something like π
Although CSS lets you do all sorts of amazing things, unfortunately for some reason you can't just do
color: linear-gradient(#67b26f, #4ca2cd);
To set gradient as the text color
But fret not! There's a small workaround that we can use.
Here's how -
- Add the gradient as a background
- Add a background clip with value as text
- Set the color to transparent And you're done!
Here's the codepen:
Thanks for reading and Happy Hacking!
19