The text-fill-color property

The text-fill-color property property specifies a fill color of text characters or their transparency using the transparent value.

Syntax

cssselector {
  text-fill-color: color or transparent;
}

Example

Let's give our text a gradient fill with transparency:

html<p>
  This is a text.
</p>
cssbody {
  width: 200px;
  height: 100px;
}
p {
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
  font-size: 26px;
  background: linear-gradient(#c42222, #ffef5e);
  -webkit-background-clip: text;
  background-clip: text;
}

Результат:

See also