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"></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
There is something wrong with your iconfont. You can use a solid icon and set the font color directly like the one above
Use this
❤