備忘録的プログラミングリファレンス

text-decoration-style プロパティ

 text-decoration-style プロパティは、text-decoration-line プロパティによるテキストの装飾線の線種(ラインのスタイル)を指定する CSS プロパティです。
 text-decoration-lineプロパティによる下線、上線、取り消し線に、無地、波状、点線、破線、二重線を指定することができます。

波の下線(Exampleの参照
text-decoration-line: underline;
text-decoration-style: wavy;
表示例

text-decorationの例です。

 CSSでは、text-decoration プロパティはテキストへの装飾という扱いです。

マーカーのような線を加えるにはbackgroundプロパティlinear-gradient()関数を使います。

ページ内 Index

構文(Syntax)

CSS

text-decoration-style: solid | double | dotted | dashed | wavy | initial | inherit;

DOM ( JavaScript )

値の取得
String = object.style.textDecorationStyle;
値の設定
object.style.textDecorationStyle="solid | double | dotted | dashed | wavy | initial | inherit";

値(Values)

Value摘要
solid初期値(default値)、実線
double2重線
dotted点線
dashed破線
wavy波線
initial初期値に戻す
inherit親エレメントのプロパティを継承

備考(Remarks)

初期値(Default value)solid
継承(Inherited)No
CSS AnimationNo

Example

 text-decoration-styleの例です。 text-decoration-lineの設定が必要です。

 ここでは、波線が表示されます。色はtext-decoration-colortext-decorationで設定します。