简体   繁体   中英

Font Awesome icons 4.2.0 Minimal do not display

I'm trying to put a font awesome icons for my star rating.

I copy this below:

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css">

And put it in a page(font-awesome-4.2.0.min.css) this below:

<link rel="stylesheet" href="css/font-awesome-4.2.0.min.css">

This work well

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css">

But this do not work

<link rel="stylesheet" href="css/font-awesome-4.2.0.min.css">

How can I make this (In a webpage: font-awesome-4.2.0.min.css) to work so that my icons can display

You should keep the folder structure of font awesome and point to the css there. Moving around the files can cause issues because they could be using relative paths to link to their other source files. It should look something like this:

<link rel="stylesheet" type="text/css" href="./font-awesome/css/font-awesome.min.css">

I use font awesome in almost every project and have had very little issues. You can see their instructions here: https://fortawesome.github.io/Font-Awesome/get-started/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM