Creating Gradient text only using CSS

0 views - 1 minute readEdit this post

I rely on your support to keep this website running. If you find the content valuable, please consider making a small donation. whether it’s ₹25/$1 or ₹500/$5.

Donate

Secured by Stripe

To create gradient text using only css we can use background-clip property in css.

h1 {
  background: -webkit-linear-gradient(blue, blueviolet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

See the Pen Creating gradient text by Preet Suthar (@preetsuthar17) on CodePen.

Did you enjoyed the post?

Twitter (x)