颜色
警告框
A simple primary alert—check it out!
A simple secondary alert—check it out!
A simple success alert—check it out!
A simple danger alert—check it out!
A simple warning alert—check it out!
A simple info alert—check it out!
A simple light alert—check it out!
A simple dark alert—check it out!
警告框(alert)组件
A simple primary alert with
an example link. Give it a click if you like.
链接的颜色:通过使用 .alert-link 工具类可以为任何警告框(alert)组件添加颜色相匹配的链接。
Well done!
警告框(alert)组件还可以包含其它 HTML 元素,例如标题、段落、分割线等。
添加图标和关闭按钮
Holy guacamole! You should check in on some of those fields below.
An example alert with an icon
An example success alert with an icon
An example warning alert with an icon
An example danger alert with an icon
徽章(Badge)
标题中的徽章 New
通过使用背景色(background)相关的工具类可以快速更改徽章(badge)组件的外观。请注意,使用 Bootstrap 的默认 .bg-light 类时,你需要使用文本颜色相关的工具类
(例如 .text-dark)来设置适当的文本颜色。这是因为背景色相关的工具类除了设置 background-color 外不会更改任何其它设置。
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
胶囊式徽章(Pill badges)
使用 .rounded-pill 工具类能够让徽章(badge)组件的边角变得更圆滑(这是通过设置更大的 border-radius 实现的)。
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
按钮(Buttons)
带轮廓线的按钮
当你需要使用按钮,但不希望按钮带有背景颜色时,请将默认的修饰符类(modifier class)
替换为 .btn-outline-* 系列类(class),已去除按钮上的所有背景图片和颜色。
卡片(Cards)
更加详细的卡片使用
Bootstrap 的卡片提供了具有多种变体和选项的灵活且可扩展的内容容器。
查看更多
This is some text within a card body.
Some quick example text to build on the card title and make up the bulk of the card's content.
- An item
- A second item
- A third item
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere
Primary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Secondary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Success card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Danger card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Warning card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Info card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Light card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Dark card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Primary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Secondary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Success card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Danger card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Warning card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Info card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Light card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Dark card title
Some quick example text to build on the card title and make up the bulk of the card's content.
下拉菜单(Dropdowns)
使用 Bootstrap 下拉插件切换上下文覆盖以显示链接列表等。
导航条下拉菜单
表单(Forms)