开始使用 Bootstrap

365被限制投注的原因 2025-08-11 16:59:29 admin 访问量: 3453
开始使用 Bootstrap

快速开始

¥Quick start

无需任何构建步骤,即可通过 CDN 包含 Bootstrap 的生产就绪 CSS 和 JavaScript。通过 Bootstrap CodePen 演示 来实际体验。

¥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.

在项目根目录中创建一个新的 index.html 文件。在移动设备中包含 标签以及 适当的响应式行为。

¥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!

包含 Bootstrap 的 CSS 和 JS。将 标签放在 中用于我们的 CSS,将

你也可以分别包含 Popper 和我们的 JS。如果你不打算使用下拉菜单、弹出窗口或工具提示,请省略 Popper 以节省一些字节。

¥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.

你好世界!在你选择的浏览器中打开页面以查看你的 Bootstrapped 页面。现在,你可以开始使用 Bootstrap 进行构建,创建你自己的 layout,添加数十个 components,并使用 我们的官方示例。

¥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 链接

¥CDN links

作为参考,以下是我们的主要 CDN 链接。

¥As reference, here are our primary CDN links.

描述URLCSShttps://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.cssJShttps://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js

你还可以使用 CDN 获取我们的任何 内容页面中列出的其他构建。

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

使用 CDN 链接时,请务必使用 integrity 属性来验证文件和版本是否正确。这些哈希值对于每个文件和 Bootstrap 版本都是唯一的,因此当你更新到新版本时,请确保 integrity 属性也已更新。

¥When using CDN links, be sure to use the integrity attribute to verify the correct files and versions. These hashes are unique to each file and version of Bootstrap, so when you update to a new version, be sure the integrity attribute is also updated.

我们还包含一个 crossorigin="anonymous" 属性,用于防止 CORS 错误。

¥We also include a crossorigin="anonymous" attribute to prevent CORS errors.

下一步

¥Next steps

详细了解 Bootstrap 使用的一些 重要的全局环境设置。

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

在我们的 内容部分 和下面的 需要 JavaScript 的组件 列表中了解 Bootstrap 中包含的内容。

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

需要更多的力量吗?考虑使用 Bootstrap by 通过包管理器包含源文件 进行构建。

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

希望将 Bootstrap 用作