字体真棒显示只是方框,而不是图标 [英] Font awesome showing just square box instead icon
本文介绍了字体真棒显示只是方框,而不是图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用font-awesome,我不希望添加css与http,我下载字体awesome并包括在我的代码,这里是我的代码
I am using font-awesome, I do not wish to add css with http, I downloaded font awesome and included into my code, Here is my code
<html>
<head>
<link rel="stylesheet" href="../css/font-awesome.css">
<link rel="stylesheet" href="../css/font-awesome.min.css">
</head>
<body>
<div style="font-size: 44px;">
<i class="fa fa-camera-retro fa-lg"></i> fa-lg
<i class="fa fa-camera-retro fa-2x"></i> fa-2x
</div>
</body>
</html>
我得到的是平方而不是图标。
I am getting bordered square instead of icon.
推荐答案
当您打开 font-awesome.min.css
时,可以看到以下路径:
When you open font-awesome.min.css
you can see following path:
'Fonts/fontawesome-webfont.ttf?v=4.2.0' ...
这意味着您必须创建目录 Fonts
,然后复制文件 fontawesome-webfont.ttf
( fontawesome-webfont.woff
, fontawesome-webfont.eot
)。之后,一切都应该很好。
It means that you have to create directory Fonts
and then copy files fontawesome-webfont.ttf
(fontawesome-webfont.woff
, fontawesome-webfont.eot
) to this folder. After that everything should work fine.
这篇关于字体真棒显示只是方框,而不是图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文