DEV Community

Atif Riaz
Atif Riaz

Posted on

Gradient Text

Gives text a gradient color.

HTML

<h1 class="gradient-text">Gradient text</h1>
Enter fullscreen mode Exit fullscreen mode

CSS

.gradient-text {
font-size: 100px;
  background: -webkit-linear-gradient(pink, red);
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
}
Enter fullscreen mode Exit fullscreen mode

Demo

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay