The habit of writing CSS to determine the speed of page rendering, this point in the brain residual ie more obvious. Develop good habits, and even the formation of norms, will make your page faster loading, the user experience is higher, the following is a zero-free summary of some of the improved CSS rendering speed, for your reference.
1, do not use *{}
Often have front-end developers use *{margin:0 padding:0} for CSS reset, this method although write simple, but the rendering of browser engine to traverse all the tags, very effective, highly recommended not to use this!
Suggested Solution: Use these tags you use to deal with, for example: body,li,p,h1{margin:0 padding:0}, you can refer to the large web site CSS reset code.
2, the page with absolute positioning less
Absolute positioning (Position:absolute) is commonly used in web page layouts, especially when it comes to floating effects that make the page look cool. But because of the browser's rendering mechanism, if you use too much absolute positioning in your Web pages, your pages will become very slow.
Suggested solution: Use as little as possible, adapt to the same effect, and work with a workaround.
3, let the attribute as many as possible to inherit
As much as possible, some attribute children can inherit the parent element instead of overriding the parent element.
4, the level of CSS can not be too much
#zishu. Info. tool. Sidebar h2{font-size:12px;}, which is highly deprecated, recommended:. zishu-s-h2{font-size:12px;
5, do not vent the class
Do not empty class or no class in the HTML code, so meaningless.
6, a reasonable layout
Reasonable layout, you can change the style of CSS and rendering process, you can refer to the layout of large sites.