What is the purpose of the `fa-fw` class?

放肆的年华 提交于 2019-12-21 06:56:34

问题


Looking through the examples on the fontawesome website, I notice a few make use of the class fa-fw. For example:

<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>

I have tried with and without it and I cannot see any notable difference.

What is the purpose of the fa-fw class?


回答1:


Fixed Width Icons

I've opened the sample page in Chrome, opened inspector on the "Library"-Element of the fw-sample and removed the fw-class. This messes up the icon-alignment - and that is also mentioned as the purpose of fw: ensuring proper alignment of the icons :-)




回答2:


Icon size, some icons are bigger, if you use fa fa-fw, the size of the icon will be the same regardless of how big/small it should be.



来源:https://stackoverflow.com/questions/41140132/what-is-the-purpose-of-the-fa-fw-class

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