CSS authoritative Guide (third Edition)---chapter III Structure and CASCADE

Source: Internet
Author: User

This chapter focuses on some conflicting solutions when an object is extracted multiple times using a style by a selector:

1. Specificity: Refers to the final choice when multiple effects are in effect:

This rule is compared with 0,0,0,0. Where: inline is the 1,0,0,0 ID selector is the 0,1,0,0 class selector, the property selector and the Pseudo-class: 0,0,1,0 element and pseudo-element: 0,0,0,1

The combination and the 0,0,0,0 have no contribution to the particularity, it is the

Note: A privilege is given here, and when a particular statement is particularly important, it has the highest priority when using!import.

2. Inheritance: Refers to the child element's style inherits the parent element in the node tree.

Note: Inheritance has no specificity, here and wildcard values for inheritance are compared to 0. Pass Inode wins.

3. Cascade: Refers to the rule of choice style taken when the particularity is the same. That is, "later on."

Here's an example: the set style order of hyperlinks is lvha the rule.

Summary: The most basic CSS is the cascade, this rule determines the final document representation, the core of this process is the particularity of the selector and inheritance mechanism.

CSS authoritative Guide (third Edition)---chapter III Structure and CASCADE

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.