天蓬老师2017-04-17 13:47:38
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
巴扎黑2017-04-17 13:47:38
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
大家讲道理2017-04-17 13:47:38
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.