The most common selector 8 major and small right

 

The right to choose their weights

In the css, the selector of the high weight, who left the style.

Tag selector a weight of 1

Class Selector weight is 10

Id weight selector 100

Line style weights are between 1000

With the keyword! The css important attribute weight is infinite

Weight calculation

The above weight selector superimposed, the superimposed is the sum of the weight selector

Equally weighted when added later will overwrite the previous

Kind Css selector

1. Label weight is 0001

2. Class class weight is equivalent to 0010 tag selector 255

3.Id weight is 0100 corresponding to class 255

4. wildcard to represent all labels weight is 0000

5. descendant selector .ap cumulative weight is 0011

6. Progeny selector .a> p weight is 0011

7. Intersection selector .a # as

8. Set selector and .a, b

 

Css several forms

  1. Inline style to style within a tag acts as a label tag attributes
  2. Inline style
  3. Outreach style

Css selectors of the two properties

  1. Inheritance all with the text font-related properties will inherit the quilt element, and the weight is 0000
  2. Laminating properties is an ability to solve major small selector right, it is to see that the right choice is important. Who's right major who to listen to. Equivalent to 225 0001 0010

Guess you like

Origin www.cnblogs.com/wanglei2/p/11909507.html