CSS como usar o Gradient text
January 04, 2020
Gives text a gradient color.
<p class="gradient-text">Gradient text</p>.gradient-text {
background: -webkit-linear-gradient(pink, red);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}Explanation
background: -webkit-linear-gradient(...)gives the text element a gradient background.webkit-text-fill-color: transparentfills the text with a transparent color.webkit-background-clip: textclips the background with the text, filling the text with the gradient background as the color.
Browser support
⚠️ Uses non-standard properties.