[Proficient in CSS and HTML design patterns] different weights in style sheets of Reading Notes

Source: Internet
Author: User

When I write CSS, I usually only use link to import a style sheet. Today I readProficient in CSS and HTML design patterns,It is roughly divided into six levels, from high to low.

1. The highest priority is the <style> element in the HTML document header. The clear point is the style Writing Style on the page, which is most effective and has the highest weight.

2. the second highest priority is to embed @ imporant in the HTML <style> element as the style table rule, which is actually higher, we usually write the <link> imported style sheet on the page.

3. The third height is the most classic <link> we use on the page, but it is higher than the @ imporant we import in the style sheet.

4. the fourth height is that in the style sheet, the style imported by @ important overwrites the style written by the end user, that is, the style larger than the style defined by the end user. [the end user here is the user object]

5. The fifth high is the style bound to the end user. (This is a special case if the user writes it here! Imporant. He will rewrite the parent class. Here he is the boss !)

6. The style sheet provided by the browser by default is the lowest, that is, the old 6.

 

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.