DIV+CSS must see 15 CSS Heavy

Source: Internet
Author: User

One of the most important advantages of DIV+CSS: maintain visual consistency; the previous form nesting method will make the page and the page, or region and region between the display effect will be biased. The use of the Div+css method, all pages, or all areas of the unified use of CSS file control, to avoid the different regions or different pages reflect the effect of deviation. Here are some things to note for you, I hope to help you.

1, do not use a small picture to do background tile.

This is why a lot of people do not use the 1px reason, this is known. Width high 1px picture tile a width high 200px area, need 200*200=40, 000 times, occupy resources.

2, no border.

The recommended wording is border:none; haha, I've been using this. border:0; Only defines a border with a width of zero, but the border style, color, or browser resolution, consumes resources.

3, use the * wildcard character with caution.

The so-called wildcard character, that is, all the tags in the CSS initialization, regardless of the use of unused, outdated advanced, non-discriminatory, so that a large amount of resources to occupy. To have the selected initialization label.

4, CSS hexadecimal color code abbreviation.

Accustomed to the abbreviation and lowercase, this just know, originally not recommended writing, in order to reduce the resources used to resolve. But it also increases the volume of the file. Which is superior to the inferior, needs to be carefully examined.

5, the style puts on the head, the script puts at the foot. Not inline, only outside chain.

6, the resolute use of CSS expression.

7. Use a reference style sheet instead of importing it by @import.

8, generally speaking, PNG is smaller than GIF, much smaller. Furthermore, how many colors in a GIF are wasted and worthy of optimization.

9, do not zoom in the HTML image, one not good-looking, both accounted for resources.

10, the text font best use even, 12px, 14px, 16px, the effect is very good. Special case, 15px.

11, block, UL, OL and so on to set aside at least one line spacing, left at least twice times the line spacing, right at random.

12. Between paragraphs, there should be at least one double spacing.

13, forced to specify some elements of the line-height, the body 1.6 times times the size of the text, the title 1.3 times times.

14, Chinese punctuation with full angle. English in Chinese, left and right spaces, half a corner.

15, Chinese font of bold and italic, away from better, the benefit of self-interest.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.