How do I decrease the size of a font-awesome icon?

本秂侑毒 提交于 2019-12-02 20:13:33

Font-Awesome icons, as the name suggests, are font-based. This means to decrease their size all you have to do is decrease their font-size:

.fa {
    font-size: 12px;
}
Veronica B.

There are two Font Awesome classes to use if you need something simple: fa-xs and fa-sm.

The size equivalents are:

  • fa-xs: .75em
  • fa-sm: .875em

Sizing Icons | Font Awesome (more informations here)

Font-Awesome icon size modification:

  1. "font-size" property in "style" attribute:

    <i class="fas fa-search" style="font-size: 25px;"></i>
    
  2. "font-size" property in CSS stylesheet (like the accepted answer shows)

    .fa {
        font-size: 12px;
    }
    
  3. HTML tags

    <small>
        <i class="fas fa-search"></i>
    </small>
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!