Article Introduction: 11 class with an ID "who has a high priority problem." |
Last Friday, before work, our beloved 33 adults also discussed in the group about "11 classes and an ID" who has high priority problem ~_~!
Guess
04 |
<meta charset= "Utf-8" > |
05 |
<style type= "Text/css" > |
06 |
body{font-family: "Microsoft Yahei";} |
07 |
. A1. a2 A3 A4 A5. a6 A7. A8.) |
23 |
<div class= "A11" id= "B" > |
24 |
Priority of CSS Selector |
The answer is clearly what you see, and why it's hard to tell.
Today, I suddenly think of proficient in CSS to speak about the particularity of the CSS calculation, the original is purple ...
All selector are assigned a numeric value (including inline), and all selector values are added to the final priority. However, the calculation is not a full 10 forward calculation, but instead of a higher cardinality is not specified. Ensure that the high level of selector (ID) is not exceeded by those 11 or more low-level selector combinations.
the particularity of the selector is divided into four grades: A,b,c,d can take a as the highest digit and so on.
- If the style is inline a=1
- B is the total number of IDs
- C is class, Pseudo-class, and attribute selectors total
Come to this table: