Font Awesome icons disappear after refresh of browser

拟墨画扇 提交于 2019-12-12 09:40:48

问题


My glyphicons disappear from the Internet Explorer 11 webpage after refreshing the page (F5). But when I open the webpage (after first refreshing it)by clicking on its menu link, the page is displayed correctly . . .

In chrome this works just fine even after pressing F5. I'm running Bootstrap v3.3.1.

I've taken sample code from http://fortawesome.github.io/Font-Awesome/examples/ but even this simple code does not work after pressing F5

<div class="row">
    <class ="col-lg-12">
        <div class="list-group">
            <a class="list-group-item" href="#">
                <i class="fa fa-home fa-fw"></i>&nbsp; Home
            </a>
            <a class="list-group-item" href="#">
            <i class="fa fa-book fa-fw"></i>&nbsp; Library
            </a>
            <a class="list-group-item" href="#">
                <i class="fa fa-pencil fa-fw"></i>&nbsp; Applications
            </a>
            <a class="list-group-item" href="#">
                <i class="fa fa-cog fa-fw"></i>&nbsp; Settings
            </a>
        </div>
    </class>
</div>

What do I have to do to keep the glyphicons visible after a page refresh in Internet Explorer?


回答1:


The demo page works OK for me (@Isherwood), so there must be something in my project.

The JSFiddle did work ok (@Ivijan Stefan Stipić) but I had to use a CDN to get the .CSS and .JS files in the fiddle.

So it seems that my reference to font-awesome.min.css (Fontawesome is not the same as glyphicons @Doctus) was the issue.

I replaced this with a CDN reference:

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

And it works OK now.



来源:https://stackoverflow.com/questions/27387449/font-awesome-icons-disappear-after-refresh-of-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!