Bootstrap 基礎

  1. 一種前端開發框架,如同YUI
  2. 下載源碼找開後,其文件結構以下:
  3. bootstrap/
    ├── css/
    │   ├── bootstrap.css
    │   ├── bootstrap.min.css
    │   ├── bootstrap-theme.css
    │   └── bootstrap-theme.min.css
    ├── js/
    │   ├── bootstrap.js
    │   └── bootstrap.min.js
    └── fonts/
        ├── glyphicons-halflings-regular.eot
        ├── glyphicons-halflings-regular.svg
        ├── glyphicons-halflings-regular.ttf
        └── glyphicons-halflings-regular.woff
  4. 實際引用文件以下五、6:
  5. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://code.jquery.com/jquery.js"></script>

    [如外部文件引用失敗,可加上這個引用內部文件:<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="jquery.min.js"></script>')</script> ]javascript

  6. <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/css/bootstrap.min.css">
    <!-- Optional theme -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/css/bootstrap-theme.min.css">
    <!-- Latest compiled and minified JavaScript -->
    <script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/js/bootstrap.min.js"></script>
  7. 考慮瀏覽器兼容性問題,建議在 <head> 加入 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
相關文章
相關標籤/搜索