1、应该将CSS放置于结构的上方(一般放置于head元素内)。CSS是解释型语言,Firefox和IE在等待CSS传输完成之前不会渲染任何东西。只有将CSS前置,才可在浏览器解析结构时,对页面进行渲染。
Thiscausestheblankwhitescreenproblem.Thepageistotallyblankuntilthestylesheetatthebottomisdownloaded,ontheorderof6-10secondsforthispage.Thebrowseriswaitingforthestylesheettobeloadedbeforeitrendersanythingelseinthepage,eventhestatictext.
导致的问题就是,页面会有一段时间“朴素”,突然之间又“华丽”,用户体验很不好。
2、尽量使用<linkrel=”stylesheet”href=”http://www.planabc/yuanxin.css”type=”text/css”>的样式导入方式,而减少@import的使用,更勿使用多层嵌套的@import。因为在IE里,@import相当于将<link>放在页面尾部。
Thisisavalidsyntax,but,eventhoughit'sinthedocument'sHEAD,itbreaksprogressiverenderingandinsteadcausestheblankwhitescreenandFlashofUnstyledContentproblems.
