Styl textuDecorationColor Vlastnost
Příklad
Změňte barvu čáry v podtrženém textu:
document.getElementById("demo").style.textDecorationColor = "red";
Definice a použití
Vlastnost textDecorationColor určuje barvu zdobení textu (podtržení, přetržení, protržení).
Poznámka: Vlastnost textDecorationColor bude mít vliv pouze na prvky s viditelným zdobením textu.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
Syntax
Vraťte vlastnost textDecorationColor:
object.style.textDecorationColor
Nastavte vlastnost textDecorationColor:
object.style.textDecorationColor = "color|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | aktuální barva |
---|---|
Návratová hodnota: | Řetězec představující vlastnost text-decoration-color prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost text-decoration-color
❮ Objekt stylu