Is it possible to color the fontawesome icon colors?

前端 未结 7 2046
甜味超标
甜味超标 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:04

    All you need is to set color: yellow. Because the icons are a font, they will take whatever colour you'd set to any other font (text) in the same way.

    if you want to fill the whole star as yellow, try icon-star instead of icon-star-empty

    you can try this

    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: orange;
    

    to add stroke (outline) to the font itself. I hope thats what you are looking for.

    and to fill it just use the normal

    color: yellow;
    

提交回复
热议问题