Eigenschaft text-fill-color

Die Eigenschaft text-fill-color property legt die Füllfarbe von Textzeichen oder deren Transparenz mit dem Wert transparent fest.

Syntax

cssSelektor {
  text-fill-color: Farbe oder transparent;
}

Beispiel

Lassen Sie uns unserem Text eine Verlaufsfüllung mit Transparenz zuweisen:

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;
}

Результат:

Siehe auch