Style textDecorationColor- Eigenschaft
Beispiel
Ändern Sie die Farbe der Linie in einem unterstrichenen Text:
document.getElementById("demo").style.textDecorationColor = "red";
Definition und Verwendung
Die Eigenschaft textDecorationColor gibt die Farbe der Textdekoration an (unterstrichen, überstrichen, durchgestrichen).
Hinweis: Die Eigenschaft textDecorationColor wirkt sich nur auf Elemente mit sichtbarer Textdekoration aus.
Browser-Unterstützung
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
Syntax
Geben Sie die textDecorationColor-Eigenschaft zurück:
object.style.textDecorationColor
Legen Sie die textDecorationColor-Eigenschaft fest:
object.style.textDecorationColor = "color|initial|inherit"
Eigenschaftswerte
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 |
Technische Details
Standardwert: | aktuelle Farbe |
---|---|
Rückgabewert: | Ein String, der die text-decoration-color-Eigenschaft eines Elements darstellt |
CSS-Version | CSS3 |
Verwandte Seiten
CSS-Referenz: Eigenschaft text-decoration-color
❮ Style-Objekt