Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 698 Bytes

gradient-text.md

File metadata and controls

26 lines (22 loc) · 698 Bytes
title type tags cover dateModified
Gradient text
snippet
visual
red-berries
2020-12-30 15:37:37 +0200

Gives text a gradient color.

  • Use background with a linear-gradient() value to give the text element a gradient background.
  • Use webkit-text-fill-color: transparent to fill the text with a transparent color.
  • Use webkit-background-clip: text to 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;
}