[新着] Webテンプレートを仮オープンしました
text-decoration は、文字の装飾(上線、下線、抹消線、点滅)を指定するプロパティです。
p {
text-decoration: underline;
}
| text-decoration | underline … (下線) |
|---|---|
| overline … (上線) |
|
| line-through … (抹消線) |
|
| blink … (点滅) |
|
| none … (指定なし)デフォルト |
複数の値を同時に指定する場合は、半角スペースで区切って記述します。
text-decoration: underline overline;
<html>
<head>
<title>TAG index Webサイト</title>
<style type="text/css">
<!--
#example1 { text-decoration: underline; }
#example2 { text-decoration: overline; }
#example3 { text-decoration: line-through; }
#example4 { text-decoration: blink; }
#example5 { text-decoration: underline overline; }
-->
</style>
</head>
<body>
<p id="example1">下線を指定</p>
<p id="example2">上線を指定</p>
<p id="example3">抹消線を指定</p>
<p id="example4">点滅を指定</p>
<p id="example5">上下線を指定</p>
</body>
</html>
▼これをブラウザで見ると次のように表示されます
下線を指定
上線を指定
抹消線を指定
点滅を指定
上下線を指定