bootstrap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBootstrap
Bootstrap
Bootstrap 5 dropped jQuery and embraced modern CSS (Grid, Flexbox, Variables). It remains the safest choice for admin panels and internal tools.
Bootstrap 5 移除了 jQuery,采用了现代 CSS(Grid、Flexbox、Variables)。它仍是搭建管理面板和内部工具的最稳妥选择。
When to Use
适用场景
- Prototypes: "Get it working" in 5 minutes.
- Admin Panels: Hundreds of templates available.
- Quick MVP: When custom design is a secondary concern.
- 原型开发:5分钟内快速实现可用版本。
- 管理面板:拥有数百种现成模板。
- 快速MVP开发:当自定义设计不是首要需求时。
Core Concepts
核心概念
Grid System
网格系统
The 12-column grid () is still the industry standard mental model.
col-md-612列网格()仍是行业通用的标准模型。
col-md-6Utilities
实用工具类
d-flexmt-5text-centerd-flexmt-5text-centerComponents
组件
Modals, Dropdowns, Navbars work out of the box (JS included).
模态框、下拉菜单、导航栏可开箱即用(包含JS代码)。
Best Practices (2025)
2025年最佳实践
Do:
- Use Data Attributes: (No JS code needed).
data-bs-toggle="modal" - Use CSS Variables: makes theming easy.
--bs-primary - Use SCSS: Customize the build by importing only needed parts.
Don't:
- Don't include jQuery: Bootstrap 5 doesn't need it.
建议:
- 使用数据属性:(无需编写JS代码)。
data-bs-toggle="modal" - 使用CSS变量:让主题定制变得简单。
--bs-primary - 使用SCSS:通过仅导入所需部分来自定义构建包。
不建议:
- 不要引入jQuery:Bootstrap 5不需要它。