Your location:Tech News>News>Script>15 Note CSS knowledge about it

Latest News

15 Note CSS knowledge about it

Author:fsadmin

Views:

  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 awareness.1px width and height of a picture tile width and height 200px area requires 200 * 200 = 40, 000, footprint.

  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.To selectively label initialization.

  4, CSS hex color code abbreviation.Accustomed to abbreviations and lowercase, to realize that, if they are not recommended wording, in order to reduce the resources used by parsing.But increases the file size.Better, be careful research.

  5, put the head style, script, put the foot.Do not inline, just outside the chain.

  6, determined not 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 optimization.

  9, do not scale the image 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, there must be at least double the spacing.

  13 forcibly specifies certain elements line-height, a text.6 times the size of the text, title 1.3 times.

  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 selfish.

Recommend article

Relate article