css - font awesome的图标为什么显示不出呢
迷茫
迷茫 2017-04-17 13:45:38
0
5
1378


已经很简单了,为啥显示不了呢

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(5)
Peter_Zhu

Check if there is a 404 in the console. Fontawesome requires the corresponding font file, not just css.


Make sure the corresponding path file exists

巴扎黑

The correct answer upstairs is that font-awesome is not just css, font-awesome requires several corresponding font libraries.
You can take a look at the source file downloaded from fontAsesome.
Or you can directly use the css source file of font-Asesome.

<link rel="stylesheet" href="http://fontawesome.io/assets/font-awesome/css/font-awesome.css">
$ ls -al css fonts/
css:
-rw-r--r-- 1 dong 1049089 35134 9月   8 01:36 font-awesome.css
-rw-r--r-- 1 dong 1049089 29063 9月   8 01:36 font-awesome.min.css

fonts/:
-rw-r--r-- 1 dong 1049089 124988 9月   8 01:36 FontAwesome.otf
-rw-r--r-- 1 dong 1049089  76518 9月   8 01:36 fontawesome-webfont.eot
-rw-r--r-- 1 dong 1049089 391622 9月   8 01:36 fontawesome-webfont.svg
-rw-r--r-- 1 dong 1049089 152796 9月   8 01:36 fontawesome-webfont.ttf
-rw-r--r-- 1 dong 1049089  90412 9月   8 01:36 fontawesome-webfont.woff
-rw-r--r-- 1 dong 1049089  71896 9月   8 01:36 fontawesome-webfont.woff2
黄舟

Stop using font awesome, icon font is much better

大家讲道理

It has been verified that it can be displayed. FontAwesome font requires font files. I guess it is caused by not referencing font files. Download the compressed package from github, unzip it locally, and copy the entire fonts file to the corresponding directory. It should be fine. question.

伊谢尔伦


Just like this

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template