CSS Hover自定义一个菜单项

时间:2016-07-31 17:48:32

标签: html css

HTML:

    <div class="container-fluid nav-con">
      <div class="navbar-header">

        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" 
data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">
Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> 
<span class="icon-bar"></span> </button>

        <a class="navbar-brand" href="#">Navigation</a> </div>
      <div id="navbar" class="navbar-collapse collapse">
<ul id="menu-header" class="nav navbar-nav">
  <li id="menu-item-1368" class="menu-item menu-item-type-post_type 
menu-item-object-page menu-item-1368">
<a href="http://localhost/www/">Home</a></li>

<li id="menu-item-1632" class="menu-item menu-item-type-post_type menu-item-object-page 
menu-item-1632">
<a href="http://localhost/www/artists/">Artists</a></li>

<li id="menu-item-1369" class="menu-item menu-item-type-post_type menu-item-object-page 
menu-item-1369">
<a href="http://localhost/www/store/">Store</a></li>

<li id="menu-item-3569" class="bp-menu bp-profile-nav menu-item menu-item-type-custom 
menu-item-object-custom menu-item-3569">
<a href="http://localhost/www/members/">Members Area</a></li>

</ul></div></div>
</nav>

CSS:

.navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav>li>a:hover {
        border: 0;
        color: #000 !important;
        background: #ddd;
        text-shadow: 0 -1px 1px #fff;
}

以上CSS适用于所有菜单项,悬停时会显示菜单项的背景#ddd和黑色的文字颜色。

现在我正在尝试更改一个特定菜单项的CSS - &#34;会员区&#34;

我已经尝试过这个菜单项目3569&#39;但它无法正常工作

.navbar-default .menu-item-3569 .navbar-nav>li>a:focus, .navbar-default .menu-item-3569 
.navbar-nav>li>a:hover {
        color: #EC442F !important;
}

我认为因为这是多层次的,所以我会用正确的语法来混淆我。有什么帮助吗?

1 个答案:

答案 0 :(得分:2)

在CSS中,java.lang.OutOfMemoryError用于表示public void deleteAll() { final int PAGE_SIZE = 15; final int PAGE_NUMBER = 0; final String SORTING_PROPERTY_NAME = "id"; List<User> result; Session session = sessionFactory.getCurrentSession(); Criteria criteria = session.createCriteria(User.class); criteria.addOrder(Order.asc(SORTING_PROPERTY_NAME)); criteria.setFirstResult(PAGE_NUMBER); criteria.setMaxResults(PAGE_SIZE); do { result = criteria.list(); result.forEach(session::delete); } while (result.size() == PAGE_SIZE); }

.class - 用menu-item-3569表示。

因此,而不是:

id

尝试:

#