Stijl tekstDecoratieKleur Eigenschap
Voorbeeld
Verander de kleur van de lijn, in een onderstreepte tekst:
document.getElementById("demo").style.textDecorationColor = "red";
Definitie en gebruik
De eigenschap textDecorationColor specificeert de kleur van de tekstdecoratie (onderstrepingen, bovenlijnen, doorstrepingen).
Opmerking: De eigenschap textDecorationColor heeft alleen effect op elementen met een zichtbare tekstdecoratie.
Browserondersteuning
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
Syntaxis
Retourneer de eigenschap textDecorationColor:
object.style.textDecorationColor
Stel de eigenschap textDecorationColor in:
object.style.textDecorationColor = "color|initial|inherit"
Eigendomswaarden
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
Standaardwaarde: | huidigeKleur |
---|---|
Winstwaarde: | Een tekenreeks, die de eigenschap text-decoration-color van een element vertegenwoordigt |
CSS-versie | CSS3 |
Gerelateerde pagina's
CSS-referentie: eigenschap text-decoration-color
❮ Stijlobject