amazeui学习笔记--css(常用组件1)--小徽章Badge

amazeui学习笔记--css(常用组件1)--小徽章Badge

一、总结

1、am-badge:添加am-badge来声明小徽章对象 <span class="am-badge am-badge-primary">2span>

2、badge位置:badge可以放在span或者a标签中  <a class="am-badge am-badge-primary">Freea>

3、圆角样式或者椭圆样式:am-radius 和 am-round

4、小徽章大小:小徽章大小可以通过改变里面字体的大小来实现:<span class="am-badge am-badge-secondary am-text-sm">smallspan>

 

二、小徽章Badge

Badge


目录

  • 默认样式
  • 圆角样式
  • 椭圆样式
  • 大小

添加 .am-badge class 到 

 或者  元素。

默认样式

 Copy
Allmobilize
Free Secondary Success Warning Danger
<span class="am-badge">1span> <span class="am-badge am-badge-primary">2span> <span class="am-badge am-badge-secondary">3span> <span class="am-badge am-badge-success">4span> <span class="am-badge am-badge-warning">5span> <span class="am-badge am-badge-danger">6span> <span class="am-badge am-badge-success">Allmobilizespan> <br> <a class="am-badge am-badge-primary">Freea> <a class="am-badge am-badge-secondary">Secondarya> <a class="am-badge am-badge-success">Successa> <a class="am-badge am-badge-warning">Warninga> <a class="am-badge am-badge-danger">Dangera>

圆角样式

在默认样式的基础上添加 .am-radius class。

 Copy
Allmobilize
Free Secondary Success Warning Danger
<span class="am-badge am-radius">1span> <span class="am-badge am-badge-primary am-radius">2span> <span class="am-badge am-badge-secondary am-radius">3span> <span class="am-badge am-badge-success am-radius">4span> <span class="am-badge am-badge-warning am-radius">5span> <span class="am-badge am-badge-danger am-radius">6span> <span class="am-badge am-badge-success am-radius">Allmobilizespan> <br> <a class="am-badge am-badge-primary am-radius">Freea> <a class="am-badge am-badge-secondary am-radius">Secondarya> <a class="am-badge am-badge-success am-radius">Successa> <a class="am-badge am-badge-warning am-radius">Warninga> <a class="am-badge am-badge-danger am-radius">Dangera>

椭圆样式

在默认样式的基础上添加 .am-round class。

 Copy
Allmobilize
Free Secondary Success Warning Danger
<span class="am-badge am-round">1span> <span class="am-badge am-badge-primary am-round">2span> <span class="am-badge am-badge-secondary am-round">3span> <span class="am-badge am-badge-success am-round">4span> <span class="am-badge am-badge-warning am-round">5span> <span class="am-badge am-badge-danger am-round">6span> <span class="am-badge am-badge-success am-round">Allmobilizespan> <br> <a class="am-badge am-badge-primary am-round">Freea> <a class="am-badge am-badge-secondary am-round">Secondarya> <a class="am-badge am-badge-success am-round">Successa> <a class="am-badge am-badge-warning am-round">Warninga> <a class="am-badge am-badge-danger am-round">Dangera>

大小

结合辅助类中的字号 class,改变徽章大小。

 Copy
default small normal large x large
<span class="am-badge am-badge-primary">defaultspan> <span class="am-badge am-badge-secondary am-text-sm">smallspan> <span class="am-badge am-badge-success am-text-default">normalspan> <span class="am-badge am-badge-warning am-text-lg">largespan> <span class="am-badge am-badge-danger am-text-xl">x largespan>

 

你可能感兴趣的:(amazeui学习笔记--css(常用组件1)--小徽章Badge)