字体Awesome不工作,图标显示为正方形 [英] Font Awesome not working, icons showing as squares

查看:223
本文介绍了字体Awesome不工作,图标显示为正方形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图做一个营销页面的原型,我使用Bootstrap和新的Font Awesome文件。问题是,当我尝试使用一个图标,所有在页面上呈现的是一个大方块。

So I'm trying to prototype a marketing page and I'm using Bootstrap and the new Font Awesome file. The problem is that when I try to use an icon, all that gets rendered on the page is a big square.

以下是我将文件包含在头文件中的方法:

Here's how I include the files in the head:

<head>
        <title>Page Title</title>
        <link rel="stylesheet" href="css/bootstrap.css">
        <link rel="stylesheet" href="css/bootstrap-responsive.css">
        <link rel="stylesheet" href="css/font-awesome.css">
        <link rel="stylesheet" href="css/app.css">
        <!--[if IE 7]>
            <link rel="stylesheet" href="css/font-awesome-ie7.min.css">
        <![endif]-->
</head>

下面是我试图使用图标的示例:

And here's an example of me trying to use an icon:

<i class="icon-camera-retro"></i>

但是所有这些都会在一个大方块中渲染。有人知道可能发生什么吗?

But all that gets rendered in a big square. Does anyone know what could be going on?

推荐答案

根据文档(步骤3),您需要修改提供的CSS文件以指向您网站上的字体位置。

According to the documentation (step 3), you need to modify the supplied CSS file to point to the font location on your site.

这篇关于字体Awesome不工作,图标显示为正方形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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