简体   繁体   English

Google Chrome中的字体真棒闪烁

[英]Font Awesome Blinking in Google Chrome

I am using FontAwesome as a few of my icons on my website: 我在我的网站上使用FontAwesome作为我的一些图标:

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

But, in chrome when I refresh the page it takes 0.5-ish second for Font Awesome to load causing the page to shift and then move back when the font is loaded. 但是,在我刷新页面的chrome中,加载Font Awesome需要0.5秒,导致页面移动,然后在加载字体时向后移动。

I have tried it with Edge and Firefox and they load instantly, why is this? 我已经尝试过Edge和Firefox,它们会立即加载,为什么会这样?

Try putting it directly on your hosting server and load it from there. 尝试将其直接放在您的托管服务器上并从那里加载它。 Loading assets from CDNs sometimes causes issues. 从CDN加载资产有时会导致问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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