【CSS】text-decoration-thickness - テキストの装飾(線の太さ)
CSSのtext-decoration-thicknessプロパティについてご紹介します。
text-decoration-thickness
text-decoration-thicknessはテキストの装飾線の太さを表わすプロパティです。
基本構文
text-decoration-thickness: 値;
値
一般的な値は次の通りです。
値 | 意味 |
---|---|
auto | 自動調整 |
from-font | 書体の推奨(またはautoと同じ) |
数値 | 数値の太さ |
line-through | 中央線 |
サンプル
次のサンプルはテキストの下線を数値分の太さにします。
<style>
p {
text-decoration-line: underline;
text-decoration-thickness: 5px;
}
</style>
<p>text text text text text</p>