Labels

优质
小牛编辑
128浏览
2023-12-01

本章介绍Bootstrap标签。 标签非常适合为页面提供计数,提示或其他标记。 使用类.label显示标签,如以下示例所示 -

<h1>Example Heading <span class = "label label-default">Label</span></h1>
<h2>Example Heading <span class =" label label-default">Label</span></h2>
<h3>Example Heading <span class = "label label-default">Label</span></h3>
<h4>Example Heading <span class = "label label-default">Label</span></h4>

您可以使用修饰符类修改标签的外观,例如, label-default, label-primary, label-success, label-info, label-warning, label-danger ,如以下示例所示 -

<span class = "label label-default">Default Label</span>
<span class = "label label-primary">Primary Label</span>
<span class = "label label-success">Success Label</span>
<span class = "label label-info">Info Label</span>
<span class = "label label-warning">Warning Label</span>
<span class = "label label-danger">Danger Label</span>