的亮點我有項目列表的導航欄。如何保持項目菜單
的HTML代碼
<div id="main-menu">
<ul div="nav">
<li><a href="about.html" target="_blank">ABOUT</a></li>
<li><a href="services.html" target="_blank">SERVICES</a></li>
<li><a href="portfolio.html" target="_blank">PORTFOLIO</a></li>
<li><a href="blog.html" target="_blank">BLOG</a></li>
<li><a href="contact.html" target="_blank">CONTACT</a></li>
</ul>
</div>
我做了以下CSS代碼
CSS代碼:
a:link {
color: #000000;
text-decoration: none;
}
a:active {
color:#000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #CE1F20;
text-decoration: none;
}
我需要保持的菜單項的顏色爲「#CE1F20 「就像我在頁面中一樣。例如,如果我點擊網頁服務,它會移動到服務頁面,但我必須保持服務儘可能多的「#CE1F20」的顏色我在服務頁面,如果我搬到博客應該讓博客的顏色「 #CE1F20「等。
您是否使用任何服務器端語言,lik e php?或所有靜態html? – ggreiner 2012-02-13 18:35:20
@ggreiner只有CSS和HTML。 – 2012-02-13 18:38:21
你的問題似乎矛盾。我注意到所有菜單鏈接的目標屬性是'_blank',這意味着在新窗口中打開鏈接。如果您打開了一個新窗口,那麼鏈接是否在背景窗口中保持突出顯示,這有什麼關係? – Feysal 2012-02-13 18:40:55