CSS编写的网页打开流畅相关知识与注意点
作者 佚名技术
来源 CSS技术
浏览
发布时间 2012-03-05
我们都熟知JavaScript可能会对Web页面的加载与显示产生较大的影响,因此我们常常关注JavaScript是不是会占用客户端较多的资源,然而大部分都会忽略的一件有趣的事情,CSS也会对Web页面载入的效率产生影响。 我们罗列了十几条相关的知识与注意点,大家可以系统的探讨一下,让我们编写的Web页面打开更加流畅。 请不要告诉我,你看不懂E文,只是你不愿意看!!! 1、How the style system breaks up rules The style system breaks rules up into four primary categories. It is critical to understand these categories, as they are the first line of defense as far as rule matching is concerned. I use the term key selector in the paragraphs that follow. The key selector is defined to be the rightmost occurrence of an id selector, a class selector, or a tag selector. 1.1、ID Rules The first category consists of those rules that have an ID selector as their key selector. button#backButton { } /* This is an ID-categorized rule */ #urlBar[type="autocomplete"] { } /* This is an ID-categorized rule */ treeitem > treerow > treecell#myCell :active { } /* This is an ID-categorized rule */ 1.2、Class Rules If a rule has a class specified as its key selector, then it falls into this category. button.toolbarButton { } /* A class-based rule */ .fancyText&n |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于CSS编写的网页打开流畅相关知识与注意点的所有评论