DIV CSS experts have to look at 15 CSS knowledge

1, do not use too small to do the background picture tiled. This is the reason why a lot of people do not have a 1px, this known. 1px width and height of a picture tile width and height 200px area requires 200 * 200 = 40, 000, resource-intensive.
2, no border. Recommended wording is border: none ;, Haha, I have been using this. border: 0; just define the border width is zero, but the border style, color, or will be resolved browser footprint.
3, caution * wildcard. The so-called wildcard, is all the CSS tags are initialized, regardless of the use of unused, outdated advanced, non-discriminatory, so big footprint. There must initialize the label of choice.
4, CSS hex color code abbreviations. Accustomed to abbreviations and lowercase, to realize that, if they are not recommended wording, in order to reduce the analytical occupied resources. But increase file size. Which one is better, need to be carefully verified.
5, put the head style, script, put the foot. Do not inline, just outside the chain.
6, determined without CSS expressions.
7, using the reference style table instead introduced through @import.
8, in general, PNG smaller than GIF, much smaller. Moreover, GIF how many colors are being wasted, it is worth optimizing.
9, do not zoom images in HTML, one does not look good, both accounting for resources.
10, preferably with an even number of body font, 12px, 14px, 16px, the effect is very good. Special case, 15px.
11, block, ul, ol, etc. up and down to stay out at least double-spaced, double spaced at least the left and right at will.
12, between paragraphs, must be at least double the line spacing.
13, line-height specifies forced some of the elements, the text character size 1.6 times, 1.3 times the title.
14, Chinese punctuation width is Full. English inclusion in Chinese, the left and right spaces, half-width.
15, Chinese bold and italic fonts, away from the good, the people self-interest.

Published an original article · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/u011927449/article/details/104025357