twitter-bootstrap-3 安装

示例

  • 直接下载-下载链接

  • CDN-到达这里

  • 凉亭- bower install bootstrap[阅读]

  • NPM - npm install bootstrap[阅读]

  • 作曲家- composer require twbs/bootstrap[阅读]

  • 自定义-我有自己的配置,可以在此处自定义。

  • Sass-对于Sass相关项目,您可以在这里获得。

用法

<head>
  <link rel="stylesheet" href="path/to/bootstrap.min.css">
</head>

使用body标签上方的script标签来引用bootstrap js文件(请参见下文)。另外请注意,bootstrap对大多数小部件都使用jQuery,例如手风琴轮播等。因此,请在jQuery js文件下面引用bootstrap js文件。

    **样品**

<!DOCTYPE html>
<html lang="en">

<head>

  <title>Form Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>

<body>

  <div class="container">
    <h2>Form Email</h2>
    <form role="form">
      <div class="form-group">
        <label for="email">Email:</label>
        <input type="email" class="form-control" id="email" placeholder="Enter email">
      </div>
      <div class="form-group">
        <label for="pwd">Password:</label>
        <input type="password" class="form-control" id="pwd" placeholder="Enter password">
      </div>
      <div class="checkbox">
        <label><input type="checkbox"> Remember me</label>
      </div>
      <button type="submit" class="btn btn-default">Submit</button>
    </form>
  </div>

  <script xx_src="https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js"></script>
  <script xx_src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</body>

</html>