スタイル指定部(クリックすると説明が出ます。)に次のように記述します。
A:link{color:yellow; background:green}
A:visited{color:white; background:silver}
A:hover{color:red; background:yellow}
- A:link:未訪問の文字の色(青)、背景の色(白)
- A:visited:訪問した後の文字の色(白)、背景の色(銀)
- A:hover:マウスを載せた時の文字の色(赤)、背景の色(黄)
- backgroundを記述しなければ、背景の色は付きません。
ブラウザ対応表
ブラウザ | IE | Netscape | Opera
|
バージョン | 5.00 | 5.50 | 6.0 | 6.2.3 | 7.01 | 6.06 | 7.21
|
対応 | ○ | ○ | ○ | ○ | ○ | ○ | ○
|