📅  最后修改于: 2021-01-07 00:39:40             🧑  作者: Mango
Materialize-css 徽章用于通知您有新消息或未读消息或通知。您可以将新类添加到徽章中,以为其提供背景。徽章可以是数字或图标。通常用于强调项数。
请参见Materialize CSS徽章中使用的以下两个类:
Index | Class name | Description |
---|---|---|
1) | badge | It is used to identify an element as an mdl badge component. It is required for span element. |
2) | new | It is used to add a “new” class to a badge component gives it a background. |
让我们以一个示例来演示徽章的不同用法:
The Materialize Badges Example
Badges Example
Badges in List
Badges in dropdowns
Dropdown
Badges in Navigation
输出: