text-decoration-styleプロパティ
text-decoration-styleプロパティは、text-decoration-lineプロパティによるテキストの装飾線の線種(ラインのスタイル)を指定するプロパティです。
text-decoration-lineプロパティによる線を、無地、波状、点線、破線、二重などに指定することができます。
CSSでは、text-decorationプロパティはテキストへの装飾という扱いです。
text-decoration-line: underline; text-decoration-style: wavy;
関連プロパティ
以下のような関連するプロパティがあります。
text-decoration-color | 装飾線の色 |
text-decoration-style | 装飾線の線種 |
text-decoration | 装飾線のプロパティtext-decoration-*を一括指定 |
マーカーのような線を加えるにはbackgroundプロパティにlinear-gradient()関数を使います。
構文(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で設定します。
マーカーのような線を加えるにはbackgroundプロパティにlinear-gradient()関数を使います。
関連(Related)
HTML、CSS、DOMのテキスト、フォント、編集用途の一覧です。
HTML
- リンク
- <a>
- テキスト
- <br>、 <h2-h6>、 <hr>、 <p>
- マーカー
- <mark>
- 書式方向
- <bdi>、 <bdo>
- 単語の扱い
- <wbr>
- プログラムコード例
- <code>、 <kbd>、 <pre>、 <samp>、 <var>
- 化学式、数式
- <sub>、 <sup>
- 削除された内容や追記された内容の補足
- <del>、 <ins>
- 引用や定義、出典を明示
- <abbr>、 <address>、 <blockquote>、 <q>、 <cite>、 <dfn>
- 日時
- <time>
- ?データ用?
- <data>
- スカラー値、ゲージ
- <meter>、 <progress>
- ルビ
- <rp>、 <rt>、 <ruby>
CSS
- フォント
- color、 font、 font-family、 font-feature-settings、 font-kerning、 font-size、 font-stretch、 font-style、 font-variant、 font-variant-caps、 font-weight
- テキスト配置
- letter-spacing、 line-height、 overflow-wrap、 tab-size、 text-align、 text-align-last、 text-combine-upright、 text-indent、 text-justify、 text-overflow、 vertical-align、 white-space、 word-break、 word-spacing、 word-wrap
- 回り込み
- clear、 float
- テキスト装飾
- text-decoration、 text-decoration-color、 text-decoration-line、 text-decoration-style、 text-shadow、 text-transform、 text-underline-position
- 書式方向
- direction、 text-orientation、 writing-mode
- 自動挿入
- content、 counter-increment、 counter-reset、 quotes
- 改行
- box-decoration-break、 hyphens
- ユーザー操作
- user-select
DOM
- インターフェイス
- ClipboardEvent
- イベント
- copy、 cut、 paste
- プロパティ
- メソッド