text-decoration | NN 4 IE 4 CSS 1 |
継承 : なし | |
要素のテキストコンテンツにアンダーライン、取り消し線、オーバーライン、点滅 (Navigator と CSS のみ) の修飾要素を追加します。複数の修飾スタイルを指定する場合は、値をスペースで区切ってリストとして指定します。一般的なブラウザでは、blink 設定が無視されます。Navigator 4 では、overline 修飾が認識されません。 テキストの修飾は、親要素と子要素の関係が通常とは異なります。これらの値は継承されませんが、ネストされたアイテムの場合は修飾効果が受け継がれます。したがって、上書きしない限り、p 要素にアンダーラインが付いていると、その中にネストされた span 要素にもアンダーラインが付けられます。 |
|
CSS 構文 | |
text-decoration: decorationStyle | none
|
|
値 | |
none と、次の 4 つの定数値のいずれかが指定できます : blink | line-through | overline | underline。ただし、blink は一般にブラウザで無視されます。 |
|
既定値 | |
none |
|
例 | |
div.highlight {text-decoration: underline} |
|
適用先 | |
すべての要素 |
|
オブジェクト参照 | |
[window.]document.getElementById("elementID").style.textDecoration [window.]document.getElementById("elementID").style.textDecorationBlink [window.]document.getElementById("elementID").style.textDecorationLineThrough [window.]document.getElementById("elementID").style.textDecorationNone [window.]document.getElementById("elementID").style.textDecorationOverLine [window.]document.getElementById("elementID").style.textDecorationUnderline |