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

后端 未结 6 1097
时光取名叫无心
时光取名叫无心 2020-12-29 05:24

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

6条回答
  •  礼貌的吻别
    2020-12-29 05:32

    Since I am using FontAwesome V5.3.1, I would like to update this answer since the folder structure was changed a bit in this version.

    1. First, download the FontAwesome v5.3.1 and extract the folder.
    2. Copy the all.min.css file from the CSS folder and add it in your stylesheets.
    3. Now, Copy the webfonts folder from FontAwesome extract and place it into your project one directory above to your all.min.css file. (Refer the image below)

    Since all.min.css file refers to the webfonts folder now, we need to add this file along with the webfonts folder.

    src: url("../webfonts/fa-brands-400.eot"); // This is how it is been referred now in all.min.css file.
    

    Thank you.

提交回复
热议问题