国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

頁面中CSS加載方式的優(yōu)化

2019-11-02 17:00:58
字體:
供稿:網(wǎng)友
1、應(yīng)該將 CSS 放置于結(jié)構(gòu)的上方(一般放置于 head 元素內(nèi))。CSS 是解釋型語言,F(xiàn)irefox 和 IE 在等待 CSS 傳輸完成之前不會渲染任何東西。只有將 CSS 前置,才可在瀏覽器解析結(jié)構(gòu)時(shí),對頁面進(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)致的問題就是,頁面會有一段時(shí)間“樸素”,突然之間又“華麗”,用戶體驗(yàn)很不好。

2、盡量使用 <link rel=”stylesheet” href=”http://www.planabc/yuanxin.css” type=”text/css”> 的樣式導(dǎo)入方式,而減少 @import 的使用,更勿使用多層嵌套的 @import 。因?yàn)樵?nbsp;IE 里, @import 相當(dāng)于將 <link> 放在頁面尾部。

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.

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 麟游县| 阿鲁科尔沁旗| 永德县| 德州市| 珠海市| 日照市| 海城市| 平武县| 民县| 萨迦县| 东海县| 历史| 会泽县| 阿勒泰市| 资中县| 宜昌市| 锦屏县| 岚皋县| 马公市| 湘乡市| 霞浦县| 东海县| 会东县| 休宁县| 炉霍县| 通化县| 临汾市| 泗水县| 塘沽区| 张家港市| 犍为县| 郯城县| 永安市| 通渭县| 柯坪县| 惠来县| 辽阳市| 蒙阴县| 淳安县| 额敏县| 临朐县|