1. 程式人生 > >ace bootstrap後臺框架-導航欄api

ace bootstrap後臺框架-導航欄api

ACE導航條

.navbar {

margin-left: 0;
margin-right: 0;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
margin: 0;
padding-left: 0;
padding-right: 0;
min-height: 45px;
position: relative;
background: #438eb9;

}

Bootstrap導航條

navbar {
  1. positionrelative;
  2. z-index1000;
  3. min-height50px;
  4. margin-bottom
    20px;
  5. border1px solid transparent;
} .navbar-default {
  1. background-color#f8f8f8;
  2. border-color#e7e7e7;
} 修改了原本的導航條樣式,替換了背景色,邊框,最小高度,內外邊距。
其中ace增加了自己的navbar-brand樣式 .navbar .navbar-brand {
  1. color#fff;
  2. font-size24px;
  3. text-shadownone;
  4. padding-top10px;
  5. padding-bottom10px;
}
原: .navbar-brand
 {
  1. floatleft;//有一個左浮動
  2. padding15px 12px;
  3. font-size18px;
  4. line-height20px;
} 樣式ace-nav為ace特有的ul導航樣式
.ace-nav {
  1. height100%;
  2. margin0!important;
} .ace-nav>li:first-child {
  1. border-leftnone;
} ace-nav>li {
  1. line-height45px;
  2. height45px;
  3. border-left1px solid #DDD;
  4. padding
    0;
  5. positionrelative;
  6. floatleft!important;
} 原: .nav {
  1. padding-left0;
  2. margin-bottom0;
  3. list-stylenone;
} .nav>li {
  1. positionrelative;
  2. displayblock;
} 其中dropdown-caret為彈出選單對應的尖角,dropdown-navbar更改了選單彈出視窗的樣式 dropdown-navbar {
  1. padding0;
  2. width240px;
  3. -webkit-box-shadow0 2px 4px rgba(30,30,100,0.25);
  4. box-shadow0 2px 4px rgba(30,30,100,0.25);
  5. border-color#bcd4e5;
}

 <div class="navbar navbar-default" id="navbar"> 
   <div class="navbar-container" id="navbar-container"> 
    <div class="navbar-header"> 
     <a href="#" class="navbar-brand"> <small> <i class="icon-leaf"></i> ACE後臺管理系統 </small> </a> 
     <!-- /.brand --> 
    </div> 
    <nav class="navbar-header" role="navigation"> 
     <ul class="nav ace-nav"> 
      <li class="grey"> <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="icon-tasks"></i> <span class="badge badge-grey">4</span> </a> 
       <ul class="dropdown-navbar dropdown-menu dropdown-caret"> 
        <li> <a href="#"> 
          <div class="clearfix"> 
           <span class="pull-left">軟體更新</span> 
           <span class="pull-right">65%</span> 
          </div> </a> </li> 
        <li> <a href="#"> 
          <div class="clearfix"> 
           <span class="pull-left">硬體更新</span> 
           <span class="pull-right">65%</span> 
          </div> </a> </li> 
        <li><a href="#"> 檢視任務詳情 <i class="icon-arrow-right"></i> </a></li> 
       </ul> </li> 
     </ul> 
    </nav> 
   </div> 
  </div>