スタイルtextDecorationColorプロパティ
例
下線付きのテキストで、線の色を変更します。
document.getElementById("demo").style.textDecorationColor = "red";
定義と使用法
textDecorationColorプロパティは、テキスト装飾の色(下線、上線、線引き)を指定します。
注: textDecorationColorプロパティは、text-decorationが表示されている要素にのみ影響します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
構文
textDecorationColorプロパティを返します。
object.style.textDecorationColor
textDecorationColorプロパティを設定します。
object.style.textDecorationColor = "color|initial|inherit"
プロパティ値
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 |
技術的な詳細
デフォルト値: | currentColor |
---|---|
戻り値: | 要素のtext-decoration-colorプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:text-decoration-colorプロパティ
❮スタイルオブジェクト