CSStext -decoration-lineプロパティ
例
さまざまな種類のテキスト装飾行を設定します。
div.a
{
text-decoration-line: overline;
}
div.b
{
text-decoration-line: underline;
}
div.c
{
text-decoration-line: line-through;
}
div.d
{
text-decoration-line: overline underline;
}
定義と使用法
プロパティは、使用するテキスト装飾のtext-decoration-line
種類(下線、上線、ラインスルーなど)を設定します。
ヒント: text-decoration-line、text-decoration-style、およびtext-decoration-colorの省略形のプロパティであるtext-decorationプロパティも確認してください。
注:下線や上線など、複数の値を組み合わせて、テキストの下と上に線を表示することもできます。
デフォルト値: | なし |
---|---|
遺伝性の: | いいえ |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | オブジェクト.style.textDecorationLine = "overline" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後に-moz-または-webkit-が続く場合は、プレフィックスを使用して機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
text-decoration-line | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 7.1 -webkit- |
44.0 |
CSS構文
text-decoration-line: none|underline|overline|line-through|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
none | Default value. Specifies no line for the text-decoration | |
underline | Specifies that a line will be displayed under the text | |
overline | Specifies that a line will be displayed over the text | |
line-through | Specifies that a line will be displayed through the text | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSテキスト
HTML DOMリファレンス:textDecorationLineプロパティ