html - FontAwesome 图标未显示在网址上

标签 html css font-awesome-4

我用 HTML 设计了一个网站并使用了 FontAwesome 图标。 当我在本地主机上运行网站时,图标显示正常。 但在 url 上它不起作用。 这里的网址:Demo

这是我的自定义 CSS:

@font-face{
        font-family:'FontAwesome';
        src:url('../font/fontawesome-webfont.eot@v=3.2.1');
        src:url('../font/fontawesome-webfont.eot@#iefix&v=3.2.1') 
        format('embedded-opentype'),url('../font/fontawesome-webfont.woff@v=3.2.1') 
        format('woff'),url('../font/fontawesome-webfont.ttf@v=3.2.1') 
        format('truetype'),url('../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') 
        format('svg');font-weight:normal;font-style:normal;
}

并且

[class^="icon-"], [class*=" icon-"] {
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    text-decoration: inherit;
    -webkit-font-smoothing: antialiased;
}

并且

.icon-envelope-alt:before{content:"\f003";}
.icon-heart:before{content:"\f004";}
.icon-star:before{content:"\f005";}
.icon-star-empty:before{content:"\f006";}
.icon-user:before{content:"\f007";}
.icon-film:before{content:"\f008";}
.icon-th-large:before{content:"\f009";}
.icon-th:before{content:"\f00a";}
.icon-th-list:before{content:"\f00b";}
.icon-ok:before{content:"\f00c";}
.icon-remove:before{content:"\f00d";}
.icon-zoom-in:before{content:"\f00e";}
.icon-zoom-out:before{content:"\f010";}
.icon-power-off:before,.icon-off:before{content:"\f011";}
.icon-signal:before{content:"\f012";}

谁能帮我解决这个问题。

谢谢你。

最佳答案

我知道这个问题已经被问了一段时间,但这个答案可能有帮助:

这是服务器配置: 你应该将其添加到 web.config

    <system.webServer>
    <staticContent>
      <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
      <remove fileExtension=".woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>
</system.webServer>

完整引用here

关于html - FontAwesome 图标未显示在网址上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34201303/

相关文章:

html - CSS - 对齐不共享同一父级的 div

javascript - 隐藏可滚动 div 的滚动条

html - 图片链接和悬停在 ie 中不起作用

html - 表格单元格问题中的图像?

html - <marquee> 是 block 元素还是行内元素?

css - Font Awesome (4.0.3)+ bootstrap(3.0.0)+ asp.net : changing font family

html - 使子div成为父div的高度

html - 我有一个固定的菜单。我想创建一个按钮(在菜单中),从它的位置升起固定菜单

html - 如何在我的社交图标周围制作圆形边框?

grails - Fontawesome资源插件错误