1、應(yīng)該將 CSS 放置于結(jié)構(gòu)的上方(一般放置于 head 元素內(nèi))。CSS 是解釋型語言,F(xiàn)irefox 和 IE 在等待 CSS 傳輸完成之前不會(huì)渲染任何東西。只有將 CSS 前置,才可在瀏覽器解析結(jié)構(gòu)時(shí),對(duì)頁面進(jìn)行渲染。
This causes the blank white screen problem. The page is totally blank until the stylesheet at the bottom is downloaded, on the order of 6-10 seconds for this page. The browser is waiting for the stylesheet to be loaded before it renders anything else in the page, even the static text.
導(dǎo)致的問題就是,頁面會(huì)有一段時(shí)間“樸素”,突然之間又“華麗”,用戶體驗(yàn)很不好。
2、盡量使用 的樣式導(dǎo)入方式,而減少 @import 的使用,更勿使用多層嵌套的 @import 。因?yàn)樵?IE 里, @import 相當(dāng)于將 放在頁面尾部。
This is a valid syntax, but, even though it’s in the document’s HEAD, it breaks progressive rendering and instead causes the blank white screen and Flash of Unstyled Content problems.
掃描二維碼手機(jī)查看該文章
文章引用:http://www.qingbaosc.com/news/webzhishi/122.html
- 上一篇:解決ie6下png圖片不透明的方法
- 下一篇:css控制圓弧邊框的寫法




