欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Bootstrap下拉菜單樣式

 更新時(shí)間:2017年02月07日 15:13:24   作者:輕擾時(shí)光  
這篇文章主要為大家詳細(xì)介紹了Bootstrap下拉菜單樣式,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了Bootstrap下拉菜單的具體代碼,供大家參考,具體內(nèi)容如下

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Bootstrap</title>
  <link rel="stylesheet" href="css/bootstrap.css" />
</head>
<!--第1步:添加一個(gè)dropdown父級(jí);
第2步:給button添加一個(gè)data-toggle="dropdown"屬性;
第3步:給ul添加一個(gè)class="dropdown-menu”.
 最好再給button添加一個(gè)dropdown-toggle的class屬性
-->
<body>
  <div class="container" style="margin-top:5px">
    <div class="row">
      <div class="dropdown">
        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">學(xué)院課程 <span class="caret"></span></button><!--btn-default默認(rèn)顏色-->
        <ul class="dropdown-menu">
          <li><a href="#">html</a></li>
          <li><a href="#">css</a></li>
          <li><a href="#">javascript</a></li>
          <li><a href="#">less</a></li>
          <li><a href="#">bootstrap</a></li>
        </ul>  
      </div>

    </div>
  </div>
  <script src="js/jquery-2.1.0.js"></script>
  <script src="js/bootstrap.js"></script>
</body>
</html>

效果圖:

Bootstrap下拉菜單的樣式:

<!doctype html>
<html>
<head>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <title>Bootstrap</title>
 <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" />
</head>
<body>
 <div class="container" style="margin-top:5px">
 <div class="row">
  <div class="col-lg-4">
  <div class="dropdown"> <!--在dropdown后面加上open使下拉列表默認(rèn)展開;而pull-right使其右浮動(dòng)并右對(duì)齊,改為dropup使箭頭朝上并向上展開-->
   <button class="btn btn-default dropdown-toggle btn-block" data-toggle="dropdown">學(xué)院課程 <span class="caret"></span></button><!--btn-block使按鈕撐滿整個(gè)父級(jí)-->
   <ul class="dropdown-menu">
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >html</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >css</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >javascript</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >less</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >bootstrap</a></li>
   </ul> 
  </div>
  </div>
  <div class="col-lg-4">
  <div class="dropdown">
   <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">學(xué)院課程 <span class="caret"></span></button>
   <ul class="dropdown-menu">
   <li class="dropdown-header"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >前端</a></li><!--dropdown-header是菜單里的標(biāo)題,給li添加-->
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >html</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >css</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >javascript</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >less</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >bootstrap</a></li>
   <li class="divider"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >html</a></li><!--divider是分隔線,給li添加-->
   <li class="dropdown-header text-center"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >后端</a></li><!--text-center讓內(nèi)容居中-->
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >php</a></li>
   <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >java</a></li>
   <li class="disabled"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >.net</a></li><!--disabled使菜單不可選-->
   </ul> 
  </div>
  </div>
 </div>
 </div>
 <script src="js/jquery-2.1.0.js"></script>
 <script src="js/bootstrap.js"></script>
</body>
</html>

效果圖:

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • 用js讀、寫、刪除Cookie代碼續(xù)篇

    用js讀、寫、刪除Cookie代碼續(xù)篇

    本文是上一篇文章《用js讀、寫、刪除Cookie代碼分享及詳細(xì)注釋說(shuō)明》發(fā)現(xiàn)了些問(wèn)題,進(jìn)行分析解決,推薦給大家
    2014-12-12
  • XMLHTTPRequest的屬性和方法簡(jiǎn)介

    XMLHTTPRequest的屬性和方法簡(jiǎn)介

    由于現(xiàn)在在公司負(fù)責(zé)制作標(biāo)準(zhǔn)的靜態(tài)頁(yè)面,為了增強(qiáng)客戶體驗(yàn),所以經(jīng)常要做些AJAX效果,也許你也和我一樣在,學(xué)習(xí)AJAX。
    2010-11-11
  • js判斷當(dāng)前瀏覽器類型,判斷IE瀏覽器方法

    js判斷當(dāng)前瀏覽器類型,判斷IE瀏覽器方法

    這篇文章主要介紹了js判斷當(dāng)前瀏覽器類型,判斷IE瀏覽器方法,需要的朋友可以參考下
    2014-06-06
  • js數(shù)據(jù)類型以及其判斷方法實(shí)例

    js數(shù)據(jù)類型以及其判斷方法實(shí)例

    這篇文章主要給大家介紹了關(guān)于js數(shù)據(jù)類型以及其判斷方法的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-03-03
  • 理解Javascript_05_原型繼承原理

    理解Javascript_05_原型繼承原理

    對(duì)于面向?qū)ο蟮幕A(chǔ)語(yǔ)法在此我就不重復(fù)了,對(duì)面向?qū)ο蟛皇煜さ呐笥芽梢詤⒖础妒褂妹嫦驅(qū)ο蟮募夹g(shù)創(chuàng)建高級(jí) Web 應(yīng)用程序》一文。
    2010-10-10
  • 詳解Javascript中document.execCommand()的用法以及指令參數(shù)列表

    詳解Javascript中document.execCommand()的用法以及指令參數(shù)列表

    execCommand方法是執(zhí)行一個(gè)對(duì)當(dāng)前文檔,當(dāng)前選擇或者給出范圍的命令。在HTML5中,execCommand可以通過(guò)JavaScript代碼來(lái)調(diào)用,使得開發(fā)者可以在網(wǎng)頁(yè)中實(shí)現(xiàn)一些復(fù)雜的文本操作。在HTML編輯器中這個(gè)命令用得很多,酷炫的強(qiáng)大功能。
    2023-07-07
  • js 異步處理進(jìn)度條

    js 異步處理進(jìn)度條

    js 異步處理進(jìn)度條的實(shí)現(xiàn)代碼,需要的朋友可以參考下。
    2010-04-04
  • onkeypress字符按鍵兼容所有瀏覽器使用介紹

    onkeypress字符按鍵兼容所有瀏覽器使用介紹

    使用onkeypress字符按鍵兼容所有瀏覽器,感興趣的朋友可以參考下,希望對(duì)你學(xué)習(xí)js事件有所幫助
    2013-04-04
  • JS禁用瀏覽器退格鍵實(shí)現(xiàn)思路及代碼

    JS禁用瀏覽器退格鍵實(shí)現(xiàn)思路及代碼

    關(guān)于瀏覽器退格鍵的禁用,可行的方法有很多,在本文將為大家詳細(xì)介紹下在js中時(shí)如何做到的,有需求的各位可以參考下
    2013-10-10
  • javascript smipleChart 簡(jiǎn)單圖標(biāo)類

    javascript smipleChart 簡(jiǎn)單圖標(biāo)類

    支持 線性圖 區(qū)域圖 柱狀圖 餅圖 支持多瀏覽器 用到的是svg vml 之后加上 多層餅圖 分段圖 和組合圖
    2011-01-01

最新評(píng)論