Why font awesome icon shows empty squares?

為{幸葍}努か 提交于 2020-05-23 21:10:51

问题


I would like to make a combination of icons via FA stack but it does not work. I have pure example from documentation and it shows me only empty squares. Code looks like:

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<span class="fa-stack" style="vertical-align: top;">
    	<i class="far fa-circle fa-stack-2x"></i>
    	<i class="fas fa-flag fa-stack-1x"></i>
    </span>

and the result looks like on the picture below (last icon on the line). What am I doing wrong?


回答1:


Use the correct CDN which is the one of the V5 not the V4

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">

<span class="fa-stack" style="vertical-align: top;">
    <i class="far fa-circle fa-stack-2x"></i>
    <i class="fas fa-flag fa-stack-1x"></i>
</span> 


来源:https://stackoverflow.com/questions/60831133/why-font-awesome-icon-shows-empty-squares

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!