search

Home  >  Q&A  >  body text

css3 - css font style plus fill color instead of background color

There is a font style as follows:

I want to add color to the heart instead of the entire span surrounding the heart having color
The wrong effect is as follows:

span is defined as follows:

<span class="iconfont">&#xe61a;</span>

If you add background-color, the effect shown in the picture above will appear. If you use color directly, only the heart-shaped border will have color. Now I want to realize that the inside of the heart has color.
Please give me some advice

天蓬老师天蓬老师2768 days ago1291

reply all(2)I'll reply

  • typecho

    typecho2017-06-08 11:04:27

    There is something wrong with your iconfont. You can use a solid icon and set the font color directly like the one above

    reply
    0
  • 某草草

    某草草2017-06-08 11:04:27

    Use this

    reply
    0
  • Cancelreply