mat*_*uma 29 fonts azure twitter-bootstrap font-awesome
我们使用Twitter Bootstrap和FontAwesome来支持图标.
部署到我们的一个IIS服务器时,我需要添加MIME支持.
部署到Azure时,它看起来不像我有这种能力,所以现在我的图标没有显示,因为它似乎不知道如何使用该字体.
Jam*_*zer 72
只需将以下内容添加到web.config中即可...
<system.webServer>
<staticContent>
<remove fileExtension=".svg" />
<remove fileExtension=".eot" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".woff" mimeType="application/x-woff" />
</staticContent>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
UPDATE
由于FontAwesome nuget包中最近的更改,现在没有必要回答这个问题.
除了在接受的答案中描述的解决方案之外,我注意到我的项目中的字体是〜/ Content/fonts,但该网站正在寻找Azure上/ fonts中的字体.
作为一种解决方法,我将字体文件复制到〜/ fonts(确保将Build Action设置为Content适用于所有人),并且所有这些都在云中很好.
| 归档时间: |
|
| 查看次数: |
9640 次 |
| 最近记录: |