amazeui学习笔记--css(常用组件1)--小徽章Badge
amazeui学习笔记--css(常用组件1)--小徽章Badge
一、总结
1、am-badge:添加am-badge来声明小徽章对象 <span class="am-badge am-badge-primary">2</span>
2、badge位置:badge可以放在span或者a标签中 <a class="am-badge am-badge-primary">Free</a>
3、圆角样式或者椭圆样式:am-radius 和 am-round
4、小徽章大小:小徽章大小可以通过改变里面字体的大小来实现:<span class="am-badge am-badge-secondary am-text-sm">small</span>
二、小徽章Badge
Badge
添加 .am-badge
class 到 <div>
或者 <span>
元素。
默认样式
<span class="am-badge">1</span>
<span class="am-badge am-badge-primary">2</span>
<span class="am-badge am-badge-secondary">3</span>
<span class="am-badge am-badge-success">4</span>
<span class="am-badge am-badge-warning">5</span>
<span class="am-badge am-badge-danger">6</span>
<span class="am-badge am-badge-success">Allmobilize</span>
<br>
<a class="am-badge am-badge-primary">Free</a>
<a class="am-badge am-badge-secondary">Secondary</a>
<a class="am-badge am-badge-success">Success</a>
<a class="am-badge am-badge-warning">Warning</a>
<a class="am-badge am-badge-danger">Danger</a>
圆角样式
在默认样式的基础上添加 .am-radius
class。
<span class="am-badge am-radius">1</span>
<span class="am-badge am-badge-primary am-radius">2</span>
<span class="am-badge am-badge-secondary am-radius">3</span>
<span class="am-badge am-badge-success am-radius">4</span>
<span class="am-badge am-badge-warning am-radius">5</span>
<span class="am-badge am-badge-danger am-radius">6</span>
<span class="am-badge am-badge-success am-radius">Allmobilize</span>
<br>
<a class="am-badge am-badge-primary am-radius">Free</a>
<a class="am-badge am-badge-secondary am-radius">Secondary</a>
<a class="am-badge am-badge-success am-radius">Success</a>
<a class="am-badge am-badge-warning am-radius">Warning</a>
<a class="am-badge am-badge-danger am-radius">Danger</a>
椭圆样式
在默认样式的基础上添加 .am-round
class。
<span class="am-badge am-round">1</span>
<span class="am-badge am-badge-primary am-round">2</span>
<span class="am-badge am-badge-secondary am-round">3</span>
<span class="am-badge am-badge-success am-round">4</span>
<span class="am-badge am-badge-warning am-round">5</span>
<span class="am-badge am-badge-danger am-round">6</span>
<span class="am-badge am-badge-success am-round">Allmobilize</span>
<br>
<a class="am-badge am-badge-primary am-round">Free</a>
<a class="am-badge am-badge-secondary am-round">Secondary</a>
<a class="am-badge am-badge-success am-round">Success</a>
<a class="am-badge am-badge-warning am-round">Warning</a>
<a class="am-badge am-badge-danger am-round">Danger</a>
大小
结合辅助类中的字号 class,改变徽章大小。
default small normal large x large
<span class="am-badge am-badge-primary">default</span>
<span class="am-badge am-badge-secondary am-text-sm">small</span>
<span class="am-badge am-badge-success am-text-default">normal</span>
<span class="am-badge am-badge-warning am-text-lg">large</span>
<span class="am-badge am-badge-danger am-text-xl">x large</span>
版权申明:欢迎转载,但请注明出处
一些博文中有一些参考内容因时间久远找不到来源了没有注明,如果侵权请联系我删除。
在校每年国奖、专业第一,加拿大留学,先后工作于华东师范大学和香港教育大学。
2024-09-05:27岁,宅加太忙,特此在网上找女朋友,vx:fan404006308
AI交流资料群:753014672