最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Bootstrap精簡教程

 更新時間:2015年11月27日 15:30:42   作者:蟲師  
Bootstrap 是基于 HTML、CSS、JAVASCRIPT 的,它簡潔靈活,使得 Web開發(fā)更加快捷。本文給大家分享Bootstrap精簡教程,對Bootstrap精簡教程感興趣的朋友一起學(xué)習(xí)

Bootstrap,來自 Twitter,是目前很受歡迎的前端框架。Bootstrap 是基于 HTML、CSS、JAVASCRIPT 的,它簡潔靈活,使得 Web開發(fā)更加快捷。[1]它由Twitter的設(shè)計師Mark Otto和Jacob Thornton合作開發(fā),是一個CSS/HTML框架。Bootstrap提供了優(yōu)雅的HTML和CSS規(guī)范,它即是由動態(tài)CSS語言Less寫成。Bootstrap一經(jīng)推出后頗受歡迎,一直是GitHub上的熱門開源項目,包括NASA的MSNBC(微軟全國廣播公司)的Breaking News都使用了該項目。[2] 國內(nèi)一些移動開發(fā)者較為熟悉的框架,如WeX5前端開源框架等,也是基于Bootstrap源碼進行性能優(yōu)化而來。

特點:

Bootstrap是基于HTML5和CSS3開發(fā)的,它在jQuery的基礎(chǔ)上進行了更為個性化和人性化的完善,形成一套自己獨有的網(wǎng)站風(fēng)格,并兼容大部分jQuery插件。

bootstrap 的學(xué)習(xí)非常簡單,并且它所提供的樣式又非常精美。只要稍微簡單的學(xué)習(xí)就可以制作出漂亮的頁面。

bootstrap中文網(wǎng):http://v3.bootcss.com/ 

bootstrap提供了三種類型的下載:

-------------------------------------------------------------

用于生產(chǎn)環(huán)境的 Bootstrap

  編譯并壓縮后的 CSS、JavaScript 和字體文件。不包含文檔和源碼文件。

Bootstrap 源碼

  Less、JavaScript 和 字體文件的源碼,并且?guī)в形臋n。需要 Less 編譯器和一些設(shè)置工作。

Sass

  這是 Bootstrap 從 Less 到 Sass 的源碼移植項目,用于快速地在 Rails、Compass 或 只針對 Sass 的項目中引入。

------------------------------------------------------------

其實我們不用下載bootstrap也可以使用它:

Bootstrap 中文網(wǎng) 為 Bootstrap 專門構(gòu)建了自己的免費 CDN 加速服務(wù)?;趪鴥?nèi)云廠商的 CDN 服務(wù),訪問速度更快、加速效果更明顯、沒有速度和帶寬限制、永久免費。

base.html

<!DOCTYPE html>
<html lang="zh-CN">
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3個meta標(biāo)簽*必須*放在最前面,任何其他內(nèi)容都*必須*跟隨其后! -->
  <title>Bootstrap 101 Template</title>
  <!-- Bootstrap -->
  <link rel="stylesheet" >
 </head>
 <body>
  <h1>你好,bootstrap!</h1>
  <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
  <!-- Include all compiled plugins (below), or include individual files as needed -->
  <script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
 </body>
</html>

 base.html中已經(jīng)引入了bootstrap,將其保存,我們就可以使用bootstrap提供的樣式了。

字體圖標(biāo)

bootstrap默認提供了二百多個圖標(biāo)。我們可以通過span標(biāo)簽來使用這些圖標(biāo):

<h3>圖標(biāo)</h3>  
  <span class="glyphicon glyphicon-home"></span>
  <span class="glyphicon glyphicon-signal"></span>
  <span class="glyphicon glyphicon-cog"></span>
  <span class="glyphicon glyphicon-apple"></span>
  <span class="glyphicon glyphicon-trash"></span>
  <span class="glyphicon glyphicon-play-circle"></span>
  <span class="glyphicon glyphicon-headphones"></span>

按鈕

  <button></button>標(biāo)簽用于創(chuàng)建按鈕,bootstrap提供了豐富的按鈕樣式。

<h3>按鈕</h3>
  <button type="button" class="btn btn-default">按鈕</button>
  <button type="button" class="btn btn-primary">primary</button>
  <button type="button" class="btn btn-success">success</button>
  <button type="button" class="btn btn-info">info</button>
  <button type="button" class="btn btn-warning">warning</button>
  <button type="button" class="btn btn-danger">danger</button>
  <h3>按鈕尺寸</h3>
  <button type="button" class="btn btn-default">按鈕</button>
  <button type="button" class="btn btn-primary btn-lg">primary</button>
  <button type="button" class="btn btn-success btn-sm">success</button>
  <button type="button" class="btn btn-info btn-xs">info</button>
  <h3>把圖標(biāo)顯示在按鈕里</h3>
  <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-home"></span>&nbsp;&nbsp;按鈕</button>

按鈕除了有默認的大小外,bootstrap還提供三個參數(shù)來調(diào)整按鈕的大小,分別是:btn-lg、btn-sm和btn-xs。

下拉菜單

下拉菜單是最常見的交互之一,bootstrap提供了漂亮的樣式。

 <h3>下拉菜單</h3>
  <div class="dropdown">
   <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
    Dropdown
    <span class="caret"></span>
   </button>
   <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
    <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
    <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
    <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
    <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
   </ul>
  </div>

輸入框

  通過<input></input>標(biāo)簽去創(chuàng)建輸入框。

 <h3>輸入框</h3>
  <div class="input-group">
   <span class="glyphicon glyphicon-user"></span>
   <input type="text" placeholder="username">
  </div>
  <div class="input-group">
   <span class="glyphicon glyphicon-lock"></span>
   <input type="password" placeholder="password">
  </div>

 

導(dǎo)航欄

  導(dǎo)航欄作為整個網(wǎng)站的指引必不可少。

 <h3>導(dǎo)航欄</h3>
  <nav class="navbar navbar-inverse navbar-fixed-top">
    <div id="navbar" class="navbar-collapse collapse">
     <ul class="nav navbar-nav">
      <li class="active"><a href="#">Home</a></li>
      <li><a href="#about">About</a></li>
      <li><a href="#contact">Contact</a></li>
      <li class="dropdown">
       <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret"></span></a>
       <ul class="dropdown-menu" role="menu">
        <li><a href="#">Action</a></li>
        <li><a href="#">Another action</a></li>
        <li class="divider"></li>
        <li class="dropdown-header">Nav header</li>
        <li><a href="#">Separated link</a></li>
       </ul>
      </li>
     </ul>
    </div><!--/.nav-collapse -->
   </div>
  </nav>

表單

  人與系統(tǒng)之間數(shù)據(jù)的傳遞都需要依靠表單來完成。比如注冊/登錄信息的提交,查詢條件的提交等。用<form></form>標(biāo)簽來創(chuàng)建表單。

 <h3>表單</h3>
  <form>
  <div class="form-group">
   <span class="glyphicon glyphicon-user"></span>
   <input type="email" id="exampleInputEmail1" placeholder="Enter email">
  </div>
  <div class="form-group">
   <span class="glyphicon glyphicon-lock"></span>
   <input type="password" id="exampleInputPassword1" placeholder="Password">
  </div>
  <div class="form-group">
   <label for="exampleInputFile">File input</label>
   <input type="file" id="exampleInputFile">
   <p class="help-block">Example block-level help text here.</p>
  </div>
  <div class="checkbox">
   <label>
    <input type="checkbox"> Check me out
   </label>
  </div>
  <button type="submit" class="btn btn-default">Submit</button>
 </form>

 

警告框

  警告框是系統(tǒng)向用戶傳達信息和提供指引的重要手段。沒有針對警告框的標(biāo)簽,通過bootstrap所提供的樣式可以瞬間制作出漂亮的警告框。

<h3>警告框</h3>
  <div class="alert alert-warning alert-dismissible" role="alert">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <strong>Warning!</strong> Better check yourself, you're not looking too good.
  </div>
  <div class="alert alert-success" role="alert">
    <a href="#" class="alert-link">success!</a>
  </div>
  <div class="alert alert-info" role="alert">
    <a href="#" class="alert-link">info!</a>
  </div>
  <div class="alert alert-warning" role="alert">
    <a href="#" class="alert-link">warning!</a>
  </div>
  <div class="alert alert-danger" role="alert">
    <a href="#" class="alert-link">danger!</a>
  </div>

 

進度條

  系統(tǒng)的處理過程往往需要用戶等待,進度條可以讓用戶感知到系統(tǒng)的處理過程,從而增加容忍度。

 <h3>進度條</h3>
  <div class="progress">
   <div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
    70%
   </div>
  </div>

相關(guān)文章

  • javascript顯示中文日期的方法

    javascript顯示中文日期的方法

    這篇文章主要介紹了javascript顯示中文日期的方法,涉及javascript針對日期與字符串操作技巧,需要的朋友可以參考下
    2015-06-06
  • js中獲取鍵盤事件的簡單實現(xiàn)方法

    js中獲取鍵盤事件的簡單實現(xiàn)方法

    下面小編就為大家?guī)硪黄猨s中獲取鍵盤事件的簡單實現(xiàn)方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2016-10-10
  • js獲取一組日期中最近連續(xù)的天數(shù)

    js獲取一組日期中最近連續(xù)的天數(shù)

    這篇文章主要為大家詳細介紹了js獲取一組日期中最近連續(xù)的天數(shù),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • JS與CSS3實現(xiàn)圖片響應(yīng)鼠標(biāo)移動放大效果示例

    JS與CSS3實現(xiàn)圖片響應(yīng)鼠標(biāo)移動放大效果示例

    這篇文章主要介紹了JS與CSS3實現(xiàn)圖片響應(yīng)鼠標(biāo)移動放大效果,結(jié)合實例形式分析了javascript與css3響應(yīng)鼠標(biāo)事件動態(tài)修改頁面元素屬性實現(xiàn)圖片放大效果相關(guān)操作技巧,需要的朋友可以參考下
    2018-05-05
  • JS?可選鏈的三種形勢及好處詳解

    JS?可選鏈的三種形勢及好處詳解

    這篇文章主要為大家介紹了JS?可選鏈的三種形勢及好處詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-05-05
  • JavaScript中的函數(shù)(二)

    JavaScript中的函數(shù)(二)

    函數(shù)是由事件驅(qū)動的或者當(dāng)它被調(diào)用時執(zhí)行的可重復(fù)使用的代碼塊。本文給大家介紹介紹javascript中的函數(shù)(二),對javascript函數(shù)相關(guān)知識感興趣的朋友一起學(xué)習(xí)吧
    2015-12-12
  • JS 獲取鼠標(biāo)左右鍵的鍵值方法

    JS 獲取鼠標(biāo)左右鍵的鍵值方法

    這篇文章主要介紹了JS 獲取鼠標(biāo)左右鍵的鍵值方法,很簡單,但很實用,特別是在做與用戶交互相關(guān)的東西
    2014-10-10
  • JS中的算法與數(shù)據(jù)結(jié)構(gòu)之二叉查找樹(Binary Sort Tree)實例詳解

    JS中的算法與數(shù)據(jù)結(jié)構(gòu)之二叉查找樹(Binary Sort Tree)實例詳解

    這篇文章主要介紹了JS中的算法與數(shù)據(jù)結(jié)構(gòu)之二叉查找樹(Binary Sort Tree),結(jié)合實例形式詳細分析了二叉查找樹(Binary Sort Tree)的原理、定義、遍歷、查找、插入、刪除等常見操作技巧,需要的朋友可以參考下
    2019-08-08
  • JS算法題解旋轉(zhuǎn)數(shù)組方法示例

    JS算法題解旋轉(zhuǎn)數(shù)組方法示例

    這篇文章主要為大家介紹了JS算法題解旋轉(zhuǎn)數(shù)組方法示例,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-07-07
  • 完美實現(xiàn)八種js焦點輪播圖(下篇)

    完美實現(xiàn)八種js焦點輪播圖(下篇)

    這篇文章主要介紹了完美實現(xiàn)八種js焦點輪播圖的具體代碼,基于完美運動框架move2.js實現(xiàn)的焦點錄播圖,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-07-07

最新評論

太和县| 湘潭县| 尉犁县| 凤山县| 同心县| 宁陵县| 稷山县| 绵竹市| 彰武县| 万年县| 漠河县| 娄底市| 桃园市| 安丘市| 稻城县| 吴堡县| 西乡县| 卓尼县| 偏关县| 平陆县| 新平| 弋阳县| 吴川市| 林芝县| 思南县| 玉树县| 三都| 万山特区| 万山特区| 三原县| 拉萨市| 白朗县| 丘北县| 郑州市| 靖安县| 班戈县| 封开县| 都安| 桐梓县| 榆社县| 宝山区|