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