你好,我在网站上使用字体图标集,但我在本地查看时出现了,在服务器上查看时却不出现。
你好,我在网站上使用字体图标集,但我在本地查看时出现了,在服务器上查看时却不出现。
<meta charset="UTF-8">
或者
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
@charset "utf-8";
只需一行代码即可将 Font Awesome 添加到您的网站中,您甚至不需要下载或安装任何东西!
将以下代码粘贴到您网站 HTML 的 <head>
部分。
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
很可能实际的字体文件没有被找到。如果你查看font awesome CSS文件,你可能会看到类似这样的内容:
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome-webfont.eot');
}
<system.webServer>
<staticContent>
<remove fileExtension=".svg" />
<remove fileExtension=".eot" />
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
system.webServer>
fa fa-icon-name
还是只用fa-icon-name
?文档中的第二个是错误的。 - Justinas