选择子菜单后,我将激活主菜单,选择子菜单后主菜单的颜色应保持不变。但是到目前为止,如果我选择了任何子菜单,则只有子菜单颜色被激活,无法添加活动颜色用于主菜单。
.active a{
color: #f58634 !important;
}
.dropdown-submenu.clearfix li a{
color: #606060 !important;
}
.dropdown .not-relative,.dropdown-submenu.clearfix .active a{
color: #f58634 !important;
}
<ul class="nav navbar-nav navbar-right">
<li class="dropdown not-relative">
<a href="services" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
Services
</a>
<div class="dropdown-menu dropdown-megamenu hmenu">
<ul class="megamenu">
<li>
<ul class="dropdown-submenu clearfix">
<li class="submenu-heading">Design</li>
<li>
<a href="user-experience"><i class="icon-palette"></i> User Experience </a>
</li>
<li>
<a href="logo-and-branding"><i class="icon-palette"></i> Logo</a>
</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>