Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
423 views
in Technique[技术] by (71.8m points)

html - How to include local file of font awesome 4.1 without using CDN?

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

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

enter image description here My link which is correct.

enter image description here The font-awesome.css file path, i didn't change anything.

enter image description here directory folders and files.

enter image description here inside of font folder.

enter image description here 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  1. Download the fontawesome package from their website.
  2. Extract the package where you will find the fontawesome.css file.
  3. Copy this file to your css directory
  4. copy all the fonts files from the extracted fontawesome package to your fonts folder.
  5. Finally add the fontawesome.css to your html page by giving respective location of the css file.

AND Voila !


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...