离线中的真棒字体图标 [英] Font Awesome Icons in Offline
问题描述
有没有办法在离线状态下使用它?
Is there any way to use this in offline?
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
我复制链接并另存为font-awesome.min.css,但仍无法正常工作像这样的离线链接href = css / font-awesome.min.css rel = stylesheet type = text / css
I copy the link and save as font-awesome.min.css but still it is not working in offline like this link href="css/font-awesome.min.css" rel="stylesheet" type="text/css"
推荐答案
按下免费下载按钮,并确保您也拥有网络字体。在下载的zip文件中有一个 web-fonts-with-css
文件夹。复制项目中的字体,然后在CSS中修改字体的路径,以指向webfonts的位置。
Press the "Download free" button and make sure that you have the webfonts too. There is a web-fonts-with-css
folder in the downloaded zip. Copy the fonts in your project and modify the paths for the fonts in your CSS to point to the location of the webfonts.
如果打开问题中链接的CSS,您将看到它们具有某些导入内容
If you open the CSS linked in your questions you'll see that they have some imports with
url('../ fonts / fontawesome-webfont.woff2?v = 4.7.0')
修改这些以及下载字体的位置。
modify these with the location of the fonts downloaded.
这篇关于离线中的真棒字体图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!