758 B
758 B
title, tags, expertise, cover, firstSeen, lastUpdated
| title | tags | expertise | cover | firstSeen | lastUpdated |
|---|---|---|---|---|---|
| Gradient text | visual | intermediate | blog_images/red-berries.jpg | 2018-02-25T15:14:39+02:00 | 2020-12-30T15:37:37+02:00 |
Gives text a gradient color.
- Use
backgroundwith alinear-gradient()value to give the text element a gradient background. - Use
webkit-text-fill-color: transparentto fill the text with a transparent color. - Use
webkit-background-clip: textto clip the background with the text, filling the text with the gradient background as the color.
<p class="gradient-text">Gradient text</p>
.gradient-text {
background: linear-gradient(#70D6FF, #00072D);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
font-size: 32px;
}