Is it possible to color the fontawesome icon colors?

前端 未结 7 1927
甜味超标
甜味超标 2021-01-30 05:27

I can change fontcolor, but not the \"fill\". I first tried setting background-color, but that fills the whole icon box area.

For example, I have



        
7条回答
  •  长发绾君心
    2021-01-30 06:11

    If you came here like I did wanting a way to have a separate "fill" color for an icon than the font color (for example, the "F" of the Facebook icon is transparent and shows whatever the background is below it), here's your answer:

    You take the regular rounded square and stack it under the icon you want visible. If you want it to be white, you can specify fa-inverse assuming your default is black. More info here.

提交回复
热议问题