欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

BootStrap中如何實現(xiàn)導航條

這篇文章給大家分享的是有關BootStrap中如何實現(xiàn)導航條的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

你所需要的網(wǎng)站建設服務,我們均能行業(yè)靠前的水平為你提供.標準是產(chǎn)品質量的保證,主要從事成都網(wǎng)站設計、網(wǎng)站建設、企業(yè)網(wǎng)站建設、成都手機網(wǎng)站制作、網(wǎng)頁設計、成都品牌網(wǎng)站建設、網(wǎng)頁制作、做網(wǎng)站、建網(wǎng)站。創(chuàng)新互聯(lián)擁有實力堅強的技術研發(fā)團隊及素養(yǎng)的視覺設計專才。

一、默認的導航條

制作默認的導航條,可分以下幾步:

1.在ul里加上(ul class="nav navbar-nav")樣式;

2.在ul外加一層div或nav(ps:HTML5新屬性),并且添加樣式(div class="navbar nabar-default");

<nav class="navbar navbar-default">
  <ul class="nav navbar-nav">
   <li class="active"><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" rel="external nofollow" >吃飯</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" rel="external nofollow" >睡覺</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" rel="external nofollow" >打勇士</a></li>
  </ul>
</nav>

如圖下:

BootStrap中如何實現(xiàn)導航條

So easy吧qaq

二、帶有表單的導航條

1.在默認導航條的基礎上,再一個form。

2.form中應用樣式(form class="navbar-form")

<nav class="navbar navbar-default">
  <ul class="nav navbar-nav">
   <li class="active"><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" rel="external nofollow" >吃飯</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" rel="external nofollow" >睡覺</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" rel="external nofollow" >打勇士</a></li>
  </ul>
  <form class="navbar-form">
   <input type="text" class="form-control" placeholder="猜猜是誰?">
   
   <input type="submit" class="form-control" value="我瞧瞧~">
  </form>
</nav>

如圖下:

BootStrap中如何實現(xiàn)導航條

擦,寫錯了,其實我想寫打火箭的。。。

三、表單,下拉菜單等冗合的導航條

上一個綜合例子,不然一個一個寫,小編得coding到天亮,廢話少說,直說上料。

<nav class="navbar navbar-default">
  <ul class="nav navbar-nav">
   <li class="active"><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" rel="external nofollow" >吃飯</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" rel="external nofollow" >睡覺</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" rel="external nofollow" >打勇士</a></li>
   <li class="dropdown">
    <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" data-toggle="dropdown" class="dropdown-toggle">西決幾比幾<span class="caret"></span></a>
    <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" >4:0</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" >4:1</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" >4:2</a></li>
    </ul>
   </li>
  </ul>
  <form class="navbar-form">
   <input type="text" class="form-control" placeholder="猜猜是誰?">
   
   <input type="submit" class="form-control" value="我瞧瞧~">
  </form>
</nav>

如圖下:

BootStrap中如何實現(xiàn)導航條

咳咳,一般導航都有個大標題,如圖下:

BootStrap中如何實現(xiàn)導航條

實現(xiàn)步驟:

1.在div里添加樣式(div class="navbar-header");

2.在此div添加a標簽(a class="navbar-brand");

navbar-brand(品牌)也就是大標題啦!

<nav class="navbar navbar-default">
  <div class="navbar-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" rel="external nofollow" class="navbar-brand">阿爾德里奇</a>
  </div>
  <ul class="nav navbar-nav">
   <li class="active"><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" rel="external nofollow" >吃飯</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" rel="external nofollow" >睡覺</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" rel="external nofollow" >打勇士</a></li>
   <li class="dropdown">
    <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" data-toggle="dropdown" class="dropdown-toggle">西決幾比幾<span class="caret"></span></a>
    <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" >4:0</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" >4:1</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" >4:2</a></li>
    </ul>
   </li>
  </ul>
  <form class="navbar-form">
   <input type="text" class="form-control" placeholder="猜猜是誰?">
   
   <input type="submit" class="form-control" value="我瞧瞧~">
  </form>
</nav>

四、反色導航條

反色導航條其實是Bootstrap框架為大家提供的第二種風格的導航條,只是將"navbar-deafult"類名換成"navbar-inverse"。其他不變,見下圖:

BootStrap中如何實現(xiàn)導航條

個人還是比較喜歡這個風格的,夠裝逼~

五、固定導航條

顧名思義,其實就是fixed樣式,

Bootstrap框架提供了兩種固定導航條的方式:

.navbar-fixed-top:導航條固定在瀏覽器窗口頂部

.navbar-fixed-bottom:導航條固定在瀏覽器窗口底部

使用方法很簡單,只需要在制作導航條最外部容器navbar上追加對應的類名即可

<!--導航條固定在瀏覽器窗口頂部-->
<div class="navbar navbar-default navbar-fixed-top">
  …
</div>
<!--導航條固定在瀏覽器窗口底部-->
<div class="navbar navbar-default navbar-fixed-bottom">
  …
</div>

六、響應式導航條

<div class="navbar navbar-inverse navbar-fixed-top">
 <div class="container">
  <div class="navbar-header">
    <!-- .navbar-toggle樣式用于toggle收縮的內容,即navbar-collapse collapse樣式所在元素,-->
   <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>
   <!-- 確保無論是寬屏還是窄屏,navbar-brand都顯示 -->
   <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" rel="external nofollow" class="navbar-brand">我的主頁</a>
  </div>
  <!-- 屏幕寬度小于768px時,div.navbar-collapse容器里的內容都會隱藏,顯示icon-bar圖標,當點擊icon-bar圖標時,再展開。屏幕大于768px時,默認顯示。 -->
  <div id="navbar" class=" collapse navbar-collapse">
   <ul class="nav navbar-nav">
    <li class="active"><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" rel="external nofollow" >吃飯</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" rel="external nofollow" >睡覺</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" rel="external nofollow" >打火箭</a></li>
   </ul>
  </div>
 </div>
</div>

我這是套的反色導航條的,現(xiàn)在分別看下寬屏和窄屏的顯示效果,如圖下:

BootStrap中如何實現(xiàn)導航條

BootStrap中如何實現(xiàn)導航條

<button>里面是窄屏右上角的按鈕,span標簽是三道杠,

現(xiàn)在說一下上面代碼中第5行,data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar",這都什么跟什么啊,我這逐一介紹一下;

data-toggle="collapse"     代表     告訴js要什么事件來觸發(fā),此處的coolapse為“伸展折疊”;

data-target="#navbar"     代表     誰要以伸展折疊的方式來展示,綁定的是ID;

aria-expanded="false"      代表   是否展開,false。

談到這aria-*,為無障礙網(wǎng)頁應用。主要針對的是視覺缺陷,失聰,行動不便的殘疾人以及假裝殘疾的測試人員。尤其像盲人,眼睛看不到,其瀏覽網(wǎng)頁則需要借助輔助設備,如屏幕閱讀器,屏幕閱讀機可以大聲朗讀或者輸出盲文。

感謝各位的閱讀!關于“BootStrap中如何實現(xiàn)導航條”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

標題名稱:BootStrap中如何實現(xiàn)導航條
文章源于:http://www.aaarwkj.com/article28/pjcpcp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供域名注冊、網(wǎng)站收錄小程序開發(fā)、定制開發(fā)用戶體驗面包屑導航

廣告

聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

手機網(wǎng)站建設
日本三卡=卡无人区| 日韩精品中文字幕影视| 精品成人18亚洲av播放| 国产女人高潮流白丝视频| 久久av少妇亚洲精品| 精品综合亚洲中文字幕| 青青草青娱乐免费在线视频| 97国产精品视频在线观看| 国产精品成人免费久久黄| 国产精品国产三级农村av| 日本少妇人妻中文字幕| 日本91大神在线观看| 97在线观看全部视频| 国产精品_国产精品_k频道| 亚洲黄色av网址在线观看| 91美女黑丝免费国产视频| 久久99国产综合精品女同| 亚洲伦理国产一国产二| 国产精品自拍国产精品| 亚洲av乱码久久精品蜜桃| 日本丰满熟女毛茸茸的黑逼| 国产黄色看三级91大片| 五月色婷婷六月色丁香| 亚洲中文乱码一区二区| 粗暴蹂躏中文一区二区三区| 日韩av天堂在线观看| 久久 久久国内精品亚洲| 综合久久—本道中文字幕| 日本新任女教师在线播放| 玩弄丰满熟妇班主任老师| 天天操天天干夜夜射| 九九热视频这里是精品| 一本久久综合亚洲鲁鲁五月天| 97超频在线观看免费| 国产亚洲欧美日韩网站| 天美传媒剧国产在线观看| 不卡二卡三卡四卡精品| 欧美日韩一区二区三区色拉拉| 日韩欧美第一页在线观看| 天天操夜夜操夜夜操| 最新亚洲国产高清激情|