我可以更改Font Awesome的图标颜色吗? [英] Can I change the color of Font Awesome's icon color?
本文介绍了我可以更改Font Awesome的图标颜色吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于某种原因,我必须将我的图标包装在< a>
标记内。
是否有可能更改颜色一个字体真棒图标变黑了吗?
或者是不可能的,只要它包裹在< a>
标签中? Font awesome应该是字体不是图像,对吧?
< a href =/ users / edit>< i class = icon-cog>< / i>编辑个人资料< / a>
解决方案
这适用于我:
.icon-cog {
color:black;对于较新的版本的Font Awesome,它可能看起来像这样: >
.fa-cog {
color:black;
}
I have to wrap my icon within an <a>
tag for some reason.
Is there any possible way to change the color of a font-awesome icon to black?
or is it impossible as long as it wrapped within an <a>
tag? Font awesome is supposed to be font not image, right?
<a href="/users/edit"><i class="icon-cog"></i> Edit profile</a>
解决方案 This worked for me:
.icon-cog {
color: black;
}
For newer versions of Font Awesome, it might look like this:
.fa-cog {
color: black;
}
这篇关于我可以更改Font Awesome的图标颜色吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文