<nav id="access" role="navigation">
<h3 class="assistive-text">Main menu</h3>
<div class="skip-link"><a class="assistive-text" href="#content" title="Skip to primary content">Skip to primary content</a></div>
<div class="skip-link"><a class="assistive-text" href="#secondary" title="Skip to secondary content">Skip to secondary content</a></div>
<div class="menu-hello-container">
<ul id="menu-hello" class="menu">
<li id="menu-item-10" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-10"><a href="http://tyutoryals.nazuka.net/contact/">Contact</a></li>
<li id="menu-item-9" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-9"><a href="http://tyutoryals.nazuka.net/about-us/">About</a></li>
<li id="menu-item-175" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-175"><a href="http://tyutoryals.nazuka.net/category/know-how/">Know-How</a></li>
<li id="menu-item-8" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-8"><a href="http://tyutoryals.nazuka.net">Home</a></li>
</ul></div>
</nav>
我的一个类别项目设置为菜单栏,该项目是上面 HTML代码上的专有技术 ..问题是此菜单处于活动状态时它没有用红色着色......
这是它的CSS代码..
#access .current-menu-item > a,
#access .current-menu-ancestor > a,
#access .current_page_item > a,
#access .current_page_ancestor > a {
font-weight: bold;
color: white;
background: #D03C3C;
}
我认为问题是因为它是类别项而不是页面 ..但我不知道如何处理CSS