Bookmark and Share

Lee's 程序人生

HTML CSS Javascript XML AJAX ATLAS C# C++ 数据结构 软件工程 设计模式 asp.net Java 数字图象处理 Sql 数据库
  博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

高效的 CSS

Posted on 2008-07-31 08:19  analyzer  阅读(162)  评论(0)    收藏  举报

我们可能时常会关注 JavaScript 的效率,然而大部分都会忽略的一件有趣的事情是,CSS 也可能带来对页面载入效率的影响,正如 WebKit 的开发者,被称为“Semi-god”级别的 Dave Hyatt 所说

The sad truth about CSS3 selectors is that they really shouldn’t be used at all if you care about page performance. Decorating your markup with classes and ids and matching purely on those while avoiding all uses of sibling, descendant and child selectors will actually make a page perform significantly better in all browsers. – Dave Hyatt

如何编写高效的 CSS?Mozilla Developer Center 有这么一篇文章值得一读:Writing Efficient CSS

我要啦免费统计