【问题标题】:Font Awesome icons not showing up (no error in console)字体真棒图标未显示(控制台中没有错误)
【发布时间】:2015-05-30 13:19:50
【问题描述】:

我知道有很多问题可以解决这个问题,但没有一个对我有用:

使用firebug检查时字体路径也是正确的并且没有丢失。

我尝试使用外部链接来调用 font-awesome css 但是没有用:

Font Awesome icons disappear after refresh of browser

在这里,我了解到 chrome 有时会出现问题,但它在 mozilla 上也不起作用:

Font Awesome icons disappear after refresh in Chrome

以下是我的模板的临时链接:

http://pixelcreations.in/finepix/

我的代码:

    <!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="msapplication-tap-highlight" content="no" />
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

        <!--<link rel="stylesheet" type="text/css" href="css/index.css" />-->

        <link href="css/style.css" rel="stylesheet" />

        <!-- for the Skeleton -->
        <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="css/skeleton.css" type="text/css" media="screen" />

        <!--font awesome-->
        <link rel"stylesheet" href="css/font-awesome/font-awesome.min.css" type="text/css" media="screen" />


    </head>
    <body>
        <div class="app">
            <div class="container">
              <div class="row">
                <div class="twelve column" style="background-color: #000;height:50px; color:white; padding:15px;">
                    <div class="u-pull-left">
                        <a href="">

                        </a>
                    </div>
                    <div class="u-pull-right" style="padding-left:9px; cursor: pointer;">
                         <a href="">
                            <i class="fa fa-ellipsis-v"></i>
                        </a>
                    </div>
                    <div class="u-pull-right" style="padding-left:9px; cursor: pointer;">
                        <a href="">
                            <i class="fa fa-shopping-cart"></i>
                        </a>
                    </div>
                    <div class="u-pull-right" style="padding-left:9px; cursor: pointer;">
                         <a href="">
                            <i class="fa fa-bell "></i>
                        </a>
                    </div>
                </div>
              </div>
            </div>

            <div class="container">
              <div class="row">
                <div class="twelve column" style="background-color: #ffffff; color: #aaaaaa; width: 100%; min-height: 500px; height: auto;">

                </div>
              </div>
            </div>

        </div>
        <!--<script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>-->
        <script src="lib/jquery-1.11.2.min.js"></script>
    </body>
</html>

【问题讨论】:

    标签: html css font-awesome


    【解决方案1】:

    没有加载 CSS 文件,因为您在行中缺少 = 字符:

    <link rel"stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" type="text/css" media="screen" />
    

    改成

    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" type="text/css" media="screen" />
    

    我已经在 firebug 中验证了这一点并且可以正常工作。

    【讨论】:

    • 该死的你^^快10秒:p
    猜你喜欢
    • 2015-01-08
    • 2017-09-06
    • 2018-12-07
    • 2015-10-21
    • 1970-01-01
    • 1970-01-01
    • 2018-02-16
    相关资源
    最近更新 更多