Propriété de style textDecorationColor
Exemple
Changez la couleur de la ligne, dans un texte souligné :
document.getElementById("demo").style.textDecorationColor = "red";
Définition et utilisation
La propriété textDecorationColor spécifie la couleur de la décoration du texte (souligné, surligné, traversé).
Remarque : La propriété textDecorationColor n'aura d'effet que sur les éléments avec une décoration de texte visible.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
Syntaxe
Renvoyez la propriété textDecorationColor :
object.style.textDecorationColor
Définissez la propriété textDecorationColor :
object.style.textDecorationColor = "color|initial|inherit"
Valeurs de propriété
Value | Description |
---|---|
color | Specifies the color of the text-decoration |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Détails techniques
Valeur par défaut: | couleurcourante |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété text-decoration-color d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété text-decoration-color
❮ Objet de style