如何包括本地文件的字体真棒4.1,而不使用CDN? [英] How to include local file of font awesome 4.1 without using CDN?

查看:153
本文介绍了如何包括本地文件的字体真棒4.1,而不使用CDN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这是效果与字体awesome,我只能得到它当我使用字体awesome 4.1 CDN)




使用下载的文件,我包括fonts文件夹和font-awesome.css,但仍然没有图标出现。




我的链接是正确的。



img src =https://i.stack.imgur.com/brsLt.jpgalt =enter image description here>
font-awesome.css文件路径,我没有改变任何东西。 / p>


目录文件夹和文件。




里面的字体文件夹。




在css文件夹中。



*********************** **************************************************** **************************************************** ****

我的问题已经解决了。这是由于输入代码错误。我输入fontawesome v3.1 style

 < i class =icon-twitter-sign icon-x3> ; / i> 

现在我使用v4.1,这就是为什么它不工作。应为

 < i class =fa fa-twitter icon-x3>< / i> 

解决方案

您应该从那里网站下载fontawesome包
解压缩包
然后您应该得到fontawesome.css并将其复制到您的css目录
,然后从提取的fontawesome包复制所有的字体文件和过去它在你的字体文件夹。
最后,通过给出css文件的相应位置,在您的html页面上添加fontawesome.css。



AND Voila!


This is the effect with font awesome, i only can get it when i using font awesome 4.1 CDN)

Using downloaded files, I included the fonts folder and font-awesome.css, but still no icon appear.

My link which is correct.

The font-awesome.css file path, i didn't change anything.

directory folders and files.

inside of font folder.

inside css folder.

*********************************************************************************************************************************
I got the problem solved already. This is due to mistake in typing code. I type in fontawesome v3.1 style

 <i class="icon-twitter-sign icon-x3"></i>

and now i am using v4.1, that's why it didn't work. It should be

 <i class="fa fa-twitter icon-x3"></i>

to make it work.

解决方案

You should download the fontawesome package from there website Extract the package then you should get the fontawesome.css and copy it under your css directory then from the extracted fontawesome package copy all the fonts files and past it on your fonts folder . finally add the fontawesome.css on your html page by giving respective location of the css file.

AND Voila !

这篇关于如何包括本地文件的字体真棒4.1,而不使用CDN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆