close

轉自 https://github.com/FortAwesome/Font-Awesome/issues/11946

解答:必須在.fa中加上 font-weight: 900;

.fa, .fas {
      font-weight: 900;
}

--

問題:

then we wrote this CSS:

 

.hike-technical-data .ascent:before {
	font-family: 'Font Awesome\ 5 Free';
	content: '\f30c';
	...
}

 

On Safari everything is perfect:

safari

On Chrome and Firefox, instead of the icon, a square appear:

chrome

If, instead of the icon \f30c, we use another code, for example \f005, it also works on Chrome and Firefox:

chrome-after

Does it seem that the CSS all.css does not include everything? Or should we use another font-family?

--

解答:

Hi!

Thanks for being part of the Font Awesome Community.

The new version of Font Awesome also requires font-weight: 900; when you use solid icons in custom css classes.

Fiddle: https://jsfiddle.net/tagliala/tgzouajm/12/

The unicode entrypoint \f005 works without font-weight because it represents a regular icon with a font-weight value of 400.

Fiddle: https://jsfiddle.net/tagliala/tgzouajm/13/

I will also add an entry in the troubleshooting guide

Hope it helps

Closing here

--

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dizzy03 的頭像
    dizzy03

    碎碎念

    dizzy03 發表在 痞客邦 留言(0) 人氣()