Bootstrap 入门

Bootstrap 入门

Quick start

Get started by including Bootstrap’s production-ready CSS and JavaScript via CDN without the need for any build steps. See it in practice with this Bootstrap CodePen demo.

Create a new index.html file in your project root. Include the tag as well for proper responsive behavior in mobile devices.

Bootstrap demo

Hello, world!

Include Bootstrap’s CSS and JS. Place the tag in the for our CSS, and the

You can also include Popper and our JS separately. If you don’t plan to use dropdowns, popovers, or tooltips, save some kilobytes by not including Popper.

Hello, world! Open the page in your browser of choice to see your Bootstrapped page. Now you can start building with Bootstrap by creating your own layout, adding dozens of components, and utilizing our official examples.

CDN links

As reference, here are our primary CDN links.

Description

URL

CSS

https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css

JS

https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js

You can also use the CDN to fetch any of our additional builds listed in the Contents page.

Next steps

Read a bit more about some important global environment settings that Bootstrap utilizes.

Read about what’s included in Bootstrap in our contents section and the list of components that require JavaScript below.

Need a little more power? Consider building with Bootstrap by including the source files via package manager.

Looking to use Bootstrap as a module with