|
|
|
HOME > 文字のタグ > 文字の背景に色を付けるタグ |
|
文字の背景に色を付けるタグ |
|
|
|
|
|
|
|
|
|
文字の背景に色を付けるタグを紹介します。 |
|
ホームページを見やすくするのに大変便利なタグです。 |
|
|
|
|
|
文字の背景に色を付けるサンプル |
|
|
|
背景の色は、#ffff00に設定しています。自由に色は変えて下さい。 |
|
|
|
サンプル |
|
|
|
|
|
HTML記述例 |
|
|
|
|
<span style="background:#ffff00">文字の背景に色を付けます。</span> |
|
|
|
|
サンプル (上記の色違い) |
|
|
|
|
|
HTML記述例 |
|
|
<span style="background:#ffcccc">文字の背景に色を付けます。</span> |
|
|
|
|
オンマウスで背景に色が付く サンプル |
|
|
|
|
|
HTML記述例 |
|
|
<span onmouseover="this.style.background='#ffff00'" onmouseout="this.style.background='#ffffff'">文字の背景にオンマウスで色が付きます</span> |
|
|
|
|
オンマウスで背景の色が変わる サンプル |
|
|
|
|
|
HTML記述例 |
|
|
<span style="background:#ffff00" onmouseover="this.style.background='#ff9999'"
onmouseout="this.style.background='#ffff00'">オンマウスで背景の色が変わります
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|