ホーム>HTMLリファレンス(アルファベット検索)>text-underline-positionプロパティ
text-underline-position プロパティ …下線の表示位置を指定する
使用プロパティ
|
text-underline-position: 値; |
対象となる
要素 |
すべて |
継承 |
しない
|
値 |
below (下線をテキストの下に表示)、 above (下線をテキストの上に表示) |
|
|
解説
text-underline-position プロパティを使えば、下線を表示する位置を指定することができます。
text-underline-position プロパティで下線の表示位置を指定するには、まずtext-decoration プロパティを指定し、その値を「underline」にする必要があります。
※text-underline-position プロパティは Internet Explorer 独自のプロパティです。テキストに下線を表示する場合は text-decoration プロパティで指定しましょう。
|
使用例
記述例
<html>
<head>
<title>HOME PAGE ZERO ガイド</title>
<!--スタイルシート-->
<style type="text/css">
p.sample1 {
text-decoration: underline;
text-underline-position: below;
}
p.sample2 {
text-decoration: underline;
text-underline-position: above;
}
</style>
</head>
<!--ページの本文-->
<body>
<p class="sample1">text-underline-position プロパティの値に「below」を指定して、下線を表示します。</p>
<p class="sample2">text-underline-position プロパティの値に「above」を指定して、下線をテキストの上に表示します。</p>
</body>
</html> |
|
[ブラウザでの表示例]
HOME PAGE ZERO ガイド |
text-underline-position プロパティの値に「below」を指定して、下線を表示します。
text-underline-position プロパティの値に「above」を指定して、下線をテキストの上に表示します。 |
△ページトップへ
ホームページ初心者ガイド|
HTML|
CSS|
ホームページお役立ち情報|
ホームページレベルアップ情報|
その他