Bootstrap 是一个流行的开源前端框架,它可以帮助开发者快速搭建响应式网站和应用程序。以下是一些关于 Bootstrap 的基本信息。

快速开始

  1. 下载 Bootstrap

  2. 基本用法

    • 引入 Bootstrap 的 CSS 和 JS 文件到你的 HTML 页面中。

组件

Bootstrap 提供了一系列丰富的 UI 组件,包括:

  • 按钮 (Button)
  • 表格 (Table)
  • 弹框 (Modal)
  • 导航栏 (Navbar)
  • 面包屑 (Breadcrumb)
  • ...等等

例子

按钮

<button type="button" class="btn btn-primary">Primary</button>

表格

<table class="table table-striped">
  <thead>
    <tr>
      <th scope="col">编号</th>
      <th scope="col">名称</th>
      <th scope="col">价格</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>商品 A</td>
      <td>$10</td>
    </tr>
    <tr>
      <td>2</td>
      <td>商品 B</td>
      <td>$20</td>
    </tr>
  </tbody>
</table>

图片

Bootstrap 的图标使用 Font Awesome,你可以在 Font Awesome 官网 找到更多图标。

<i class="fa fa-home"></i> 首页

图片示例

Button