注册本站  论坛  繁體中文

电脑技巧
手机 | MP3 | MP4 | 显卡 | 主板 | 显示器 | 光存储 | 笔记本 | 网络设备 | 移动存储 | 数码相机
键鼠 | CPU | 音箱 | GPS | 电视 | 服务器 | 投影机 | 机箱电源 | 品牌电脑 | 办公打印 |
| 网站首页 | Cisco | Windows | Linux | Java | Dotnet | Oracle | 网页设计 | 平面设计 | 安全 | 软件应用 | 电脑维修 | 办公维修 |
您现在的位置: 电脑技巧 >> 网页设计 >> Dreamweaver >> 技术教程 >> 网页设计正文

页面中CSS 加载方式的优化

文章来源:planabc.net 作者:planabc 更新时间:2008-4-24 12:34:39 【 】 【加入收藏
  进入网络咨询平台

1、应该将 CSS 放置于结构的上方(一般放置于 head 元素内)。CSS 是解释型语言,Firefox 和 IE 在等待 CSS 传输完成之前不会渲染任何东西。只有将 CSS 前置,才可在浏览器解析结构时,对页面进行渲染。

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.

导致的问题就是,页面会有一段时间“朴素”,突然之间又“华丽”,用户体验很不好。

2、尽量使用 <link rel=”stylesheet” href=”http://www.planabc/yuanxin.css” type=”text/css”> 的样式导入方式,而减少 @import 的使用,更勿使用多层嵌套的 @import 。因为在 IE 里, @import 相当于将 <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.

  • 上一篇网页设计:

  • 下一篇网页设计:
  • 最 新 热 门
     Flash AS 教程:交互动画
     Flash AS 教程:子类化显示对象
     Flash AS 教程:动画事件
     Flash AS 教程:帧循环
     Flash AS 教程:创建文档类(Document class)
     Flash AS 教程:构造函数(Constructor)
     Flash AS 教程:类和面向对象编程
     Flash游戏开发教程:第一节
     Flex程序开发心得小结
     关于XML在FLASH中的应用
    最 新 推 荐
     Dreamweaver CS3中Spry详细区域功能
     页面中CSS 加载方式的优化
     网页设计中实现表格强制换行和强制不换行
     Wells Fargo提供在线存储服务
     网络存储 不同IT专家眼中的核心存储
     存储网络的6大热门领域
     赛门铁克进行重组设虚拟化部门
     企业如何面临收购后的存储整合
     微软公司欲扣响虚拟化之门
     完美的水平垂直居中!!
    相 关 文 章

    CSS实例:让页脚保持在未满屏页面的底部
    通过优化网页页面降低对内存及CPU的占用
    “惨目忍睹”IE8访问各大网站页面情况
    CSS实现始终在页面底部的层效果
    网页面设计中Css十大注意
    基本的页面设计元素布局比例
    从A页面连接到B页面后并直接把B页面的隐藏层…
    JavaScript静态页面值传递:Cookie篇
    JavaScript静态页面值传递:Window.open篇
    JavaScript静态页面值传递:URL篇

    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告

     

    Copyright 2006-2008 pcjx.com All Rights Reserved
    电脑技巧 版权所有 粤ICP备06059145号 地图
    本网站所有内容未经许可不得转载或做其他使用