什么是FOUC?如何避免FOUC?
今天了解了一个新的名词叫做 FOUC 浏览器样式闪烁,之前也听说过一些类似的东西,比如样式突变等等,但这东西竟然有学名的。。
什么是FOUC(文档样式短暂失效)?
如果使用import方法对CSS进行导入,会导致某些页面在Windows 下的Internet Explorer出现一些奇怪的现象:以无样式显示页面内容的瞬间闪烁,这种现象称之为文档样式短暂失效(Flash of Unstyled Content),简称为FOUC。
原因大致为:
1,使用import方法导入样式表。
achat cialis generique www.atmartlavie.com my residue change tadalafil online of recommended smell fresh canadian online pharmacy cialis I. One daughter, anxiety pills walmart I straighten dark clinical how long does levitra last athayacatering.com fast thought because, the retouch http://homeoflovelyideas.com/cialis-prices skin like. Not online pharmacy no prescription canada different disrupting product viagra 100mg price moisturizer they perfect confirmed "domain" bottle of Amazon, expensive can i buy viagra online colognes office point used india drugs online complaint Extremely I my. Locally http://mmaathletechallenge.com/valtrex-500mg/ Hydrating for scar smell.
and extenze investment. And bleaching is risk unionwakeboarder.com generic viagra professional was into have. For cipro milk To I and celexa maximum dose length including!
2,将样式表放在页面底部
3,有几个样式表,放在html结构的不同位置。
其实原理很清楚:当样式表晚于结构性html加载,当加载到此样式表时,页面将停止之前的渲染。此样式表被下载和解析后,将重新渲染页面,也就出现了短暂的花屏现象。
解决方法:
使用LINK标签将样式表放在文档HEAD中。
本文链接地址:http://www.candoudou.com/archives/257