CSS不适用于UAT [英] CSS do not works on UAT

查看:109
本文介绍了CSS不适用于UAT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,



我使用vb在asp.net中创建了一个项目并部署在UAT上。此项目中的css样式表包含字体很棒的图标,但这些字体很棒的图标不会出现在UAT部署中。为什么会这样?请建议解决方案

Hi friends,

I have created a project in asp.net using vb and deployed on UAT. Where in this project consists of css stylesheets containing font-awesome icons but theses font-awesome icons do not appear on UAT deployment. Why do this happen? Please suggest the solution

推荐答案

除了检查样式表和字体文件的文件路径外,还需要检查MIME类型映射。默认情况下,IIS不包含Web字体的MIME类型。



这是 web.config 文件我我目前用于字体目录:

As well as checking the file paths for the stylesheet and the font files, you'll also need to check the MIME type mapping. IIS doesn't include MIME types for web fonts by default.

This is the web.config file I'm currently using for a fonts directory:
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension="eot" mimeType="application/vnd.ms-fontobject" />
            <mimeMap fileExtension="otf" mimeType="application/x-font-opentype" />
            <mimeMap fileExtension="svg" mimeType="image/svg+xml" />
            <mimeMap fileExtension="ttf" mimeType="application/x-font-truetype" />
            <mimeMap fileExtension="woff" mimeType="application/font-woff" />
            <mimeMap fileExtension="woff2" mimeType="application/font-woff2" />
        </staticContent>
    </system.webServer>
</configuration>


这篇关于CSS不适用于UAT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆