ナビゲーション縦(4)
【CSS15】
- 以下の画像と同じように表示させるCSSを記述しなさい
- 擬似クラスで指定
以下のソースだと、1か所クリックすると、すべて訪問済みになってしまいます。
要修正! リンク1〜5を分けて指定しなくてはいけないはず。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>ナビゲーション縦(4)</title> <style type="text/css"> <!-- * { margin: 0; padding: 0; } body{ font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Hiragino Kaku Gothic Pro W3", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", sans-serif; } #nav { font-size: 0.875em; width: 200px; height: auto; margin: 50px auto; } #nav ul { list-style-type: none; border-top: 1px solid #EFEFEF; border-right: 1px solid #EFEFEF; border-left: 1px solid #EFEFEF; background-color: #FFF; } #nav li a { width: auto; height: auto; padding: 8px 10px; display: block; border-bottom: 1px solid #EFEFEF; } #nav a:link { color: #000; text-decoration: none; border-left: 10px solid #D5EAEE; } #nav a:visited { color: #000; border-left: 10px solid #0176AB; } #nav a:hover { color: #000; border-left: 10px solid #07B9F2; } --> </style> </head> <body> <div id="nav"> <ul> <li><a href="#">メニューのリンク1</a></li> <li><a href="#">メニューのリンク2</a></li> <li><a href="#">メニューのリンク3</a></li> <li><a href="#">メニューのリンク4</a></li> <li><a href="#">メニューのリンク5</a></li> </ul> </div> </body> </html>