スタイルtextDecorationStyleプロパティ
例
要素の下に波線を表示します。
document.getElementById("demo").style.textDecorationStyle = "wavy";
定義と使用法
textDecorationStyleプロパティは、行が存在する場合、その表示方法を設定または返します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
textDecorationStyle | 57.0 | 79.0 | 36.0 6.0 Moz |
12.1 | 44.0 |
構文
textDecorationStyleプロパティを返します。
object.style.textDecorationStyle
textDecorationStyleプロパティを設定します。
object.style.textDecorationStyle = "solid|double|dotted|dashed|wavy|initial|inherit"
プロパティ値
Value | Description |
---|---|
solid | Default value. The line will display as a single line |
double | The line will display as a double line |
dotted | The line will display as a dotted line |
dashed | The line will display as a dashed line |
wavy | The line will display as a wavy line |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 個体 |
---|---|
戻り値: | 要素のtext-decoration-styleプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:text-decoration-styleプロパティ
❮スタイルオブジェクト