text-decoration-styleプロパティ
text-decoration-styleプロパティは、text-decoration-line プロパティによるテキストの装飾線の線種(ラインのスタイル)を指定する CSS プロパティです。
text-decoration-lineプロパティによる下線、上線、取り消し線に、無地、波状、点線、破線、二重線を指定することができます。
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値)、実線 |
double | 2重線 |
dotted | 点線 |
dashed | 破線 |
wavy | 波線 |
initial | 初期値に戻す |
inherit | 親エレメントのプロパティを継承 |
備考(Remarks)
初期値(Default value) | solid |
継承(Inherited) | No |
CSS Animation | No |
Example
text-decoration-styleの例です。 text-decoration-lineの設定が必要です。
ここでは、波線が表示されます。色はtext-decoration-colorやtext-decorationで設定します。
関連プロパティ
以下のような関連するプロパティがあります。
text-decoration-color | 装飾線の色 |
text-decoration-color | |
text-decoration-style | 装飾線の線種 |
text-decoration | 装飾線のプロパティtext-decoration-*を一括指定 |