Skip to main content
Bootstrap

Build fast, responsive sites with Bootstrap使用Bootstrap构建快速、响应性的站点

Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.世界上最流行的前端开源工具包Bootstrap——用来快速设计和定制响应型移动端优先站点。该工具包具有Sass变量和mixin、响应型网格系统、大量预构建组件和强大的JavaScript插件。

Currently v5.1.0 · v4.6.x docs · All releases所有版本

Installation安装

Install Bootstrap’s source Sass and JavaScript files via npm, Composer, or Meteor.通过npm、Composer或Meteor安装Bootstrap的源Sass和JavaScript文件。

Package managed installs don’t include documentation or our full build scripts. 包管理安装不包括文档或完整构建脚本。You can also use our npm template repo to quickly generate a Bootstrap project via npm.您还可以使用我们的npm模板repo通过npm快速生成Bootstrap项目。

Read installation docs阅读安装文档
npm install bootstrap
gem install bootstrap -v 5.1.0

jsDelivr

When you only need to include Bootstrap’s compiled CSS or JS, you can use jsDelivr.当您只需要包含Bootstrap编译的CSS或JS时,可以使用jsDelivr

See it in action with our simple starter template, or browse the examples to jumpstart your next project. 使用我们的简单初学者模板查看它的实际操作,或者浏览示例以快速启动您的下一个项目。You can also choose to include Popper and our JS separately.您也可以选择单独包含Popper和我们的JS。

Explore the docs浏览文档
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>

Bootstrap Icons图标

For the first time ever, Bootstrap has its own open source SVG icon library, designed to work best with our components and documentation.Bootstrap有史以来第一次拥有自己的开源SVG图标库,旨在与我们的组件和文档配合使用。

Bootstrap Icons are designed to work best with Bootstrap components, but they’ll work in any project. Bootstrap图标被设计为与Bootstrap组件一起工作的最佳方式,但它们可以在任何项目中工作。They’re SVGs, so they scale quickly and easily, can be implemented in several ways, and can be styled with CSS.它们是SVG,因此可以快速轻松地进行扩展,可以通过多种方式实现,并且可以使用CSS设置样式。

Get Bootstrap Icons获取Bootstrap图标
Bootstrap Icons

Official Themes官方主题

Take Bootstrap to the next level with premium themes from the official Bootstrap Themes marketplace.使用官方Bootstrap主题市场中的高级主题,将Bootstrap功能提升到下一个级别。

Themes are built on Bootstrap as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools.主题是在Bootstrap上构建的,作为它们自己的扩展框架,具有丰富的新组件和插件、文档和强大的构建工具。

Browse themes
Bootstrap Themes