Propriété text-fill-color

La propriété text-fill-color property définit la couleur de remplissage des caractères de texte ou leur transparence en utilisant la valeur transparent.

Syntaxe

csssélecteur {
  text-fill-color: couleur ou transparent;
}

Exemple

Appliquons un dégradé de remplissage avec transparence à notre texte :

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

Результат:

Voir aussi