Style textDecorationStyleプロパティ

Style 对象参考手册Style オブジェクト

例

段落の下に波線を表示します:

document.getElementById("myP").style.textDecorationStyle="wavy";

試してみる »

定義と用法

textDecorationStyle プロパティは、線の表示方法を設定または返します。


ブラウザサポート

Internet Explorer Firefox Opera Google Chrome Safari

ほとんどすべての主要ブラウザは、textDecorationStyle プロパティをサポートしていません。

Firefox は、このプロパティの代替となる別のプロパティ、MozTextDecorationStyle プロパティをサポートしています。


構文

textDecorationStyle プロパティを返す:

object.style.textDecorationStyle

textDecorationStyle プロパティを設定する:

object.style.textDecorationStyle="solid|double|dotted|dashed|wavy|initial|inherit"

プロパティ値

值 説明
solid デフォルト値。線は単線で表示されます。
double 線は二重線で表示されます。
dotted 線は点線で表示されます。
dashed 線は破線で表示されます。
wavy 線は波線で表示されます。
initial このプロパティをデフォルト値に設定します。参照initial。
inherit 親要素からこのプロパティを継承します。参照inherit。

技術詳細

デフォルト値: solid
戻り値: 要素の text-decoration-style プロパティを表す文字列。
CSS バージョン CSS3


関連記事

CSS リファレンス:text-decoration-style プロパティ


Style 对象参考手册Style オブジェクト

その他の拡張