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. 实际引用文件如下5、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> ]

  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" />
原文地址:https://www.cnblogs.com/yipeng-yu/p/3428316.html