Home » ★CSSリファレンス

★CSSリファレンス

text-decoration-style …… テキスト傍線のスタイルを指定する

Google Chrome

Firefox
Opera
広告



text-decoration-styleプロパティは、
text-decoration-lineプロパティでテキストにつけた傍線のスタイルを指定する際に使用します。

text-decoration-styleプロパティで要素に線スタイルを指定した場合、その子孫ボックスに異なるスタイルが指定されていたとしても、テキストにつけられる傍線のスタイルは同じとなります。

■値

solid
実線(初期値)
double
二重線
dotted
点線
dashed
破線
wavy
波線

■初期値・適用対象・値の継承

初期値
solid
適用対象
すべての要素
値の継承
しない

■使用例

CSSソースは外部ファイル(sample.css)に記述

p.sample {
	text-decoration-line: underline;
}

p.sample span{
	text-decoration-line: overline;
	text-decoration-style: wavy;
}

HTMLソース

<h5>text-decoration-style: solid; を下線に指定</h5>
<p class="sample" style="text-decoration-style: solid;">
ららららら<span>りりりりり</span>るるるるる
</p>

<h5>text-decoration-style: double; を下線に指定</h5>
<p class="sample" style="text-decoration-style: double;">
ららららら<span>りりりりり</span>るるるるる
</p>

<h5>text-decoration-style: dotted; を下線に指定</h5>
<p class="sample" style="text-decoration-style: dotted;">
ららららら<span>りりりりり</span>るるるるる
</p>

<h5>text-decoration-style: dashed; を下線に指定</h5>
<p class="sample" style="text-decoration-style: dashed;">
ららららら<span>りりりりり</span>るるるるる
</p>

<h5>text-decoration-style: wavy; を下線に指定</h5>
<p class="sample" style="text-decoration-style: wavy;">
ららららら<span>りりりりり</span>るるるるる
</p>

↓↓↓

ブラウザ上の表示

text-decoration-style: solid; を下線に指定

らららららりりりりりるるるるる

text-decoration-style: double; を下線に指定

らららららりりりりりるるるるる

text-decoration-style: dotted; を下線に指定

らららららりりりりりるるるるる

text-decoration-style: dashed; を下線に指定

らららららりりりりりるるるるる

text-decoration-style: wavy; を下線に指定

らららららりりりりりるるるるる

広告



Lorem Ipsum is simply dummy text

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.