简体   繁体   中英

Font Awesome icons disappear after refresh in Chrome

Bootstrap version 3

Font Awesome version 3.2.1

I am having issues with bootstrap and font awesome on Chrome. When I originally load a page, the font awesome icons are displayed correctly. When I refresh the page, the icons disappear. **To clarify, the entire icon is missing, this is not the empty box issue that some others encounter.

I'm grasping at straws here, but I noticed there were differences in the order in which the files were retrieved between the original page load and the refresh.

When the page is refreshed, the font file is the last item to be retrieved, and it appears to be a cached version as well.

Finally, any icons that are located inside of a <div class="btn"> will be loaded when the mouse hovers over the div .

Any help would be much appreciated!

Initial page load 原始页面加载

原始页面加载标题

Page refresh 页面刷新

页面刷新标题

I guess you are on a Windows machine, right?

This is an old problem with Chrome. See this posting on CSS Tricks. The next to last post should be the answer to your question. Or in short: Use the PUA (Private Use Area) for encoding.

The Unicodes (PUA codes) for each icon are listed in the Font Awesome CSS file - see: Font Awesome uses the Unicode Private Use Area (PUA)... (around line 190).

我在最新的chrome版本中遇到了同样的问题(33.0.1750.152)我的工作解决方案:从主体到头部移动样式。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM