How are the points in CSS specificity calculated

后端 未结 7 1923
萌比男神i
萌比男神i 2020-11-21 05:18

Researching specificity I stumbled upon this blog - http://www.htmldog.com/guides/cssadvanced/specificity/

It states that specificity is a point-scoring system for

7条回答
  •  暖寄归人
    2020-11-21 06:08

    I don't believe that the blog's explanation is correct. The specification is here:

    http://www.w3.org/TR/CSS2/cascade.html#specificity

    "Points" from a class selector can't add up to be more important than an "id" selector. It just doesn't work like that.

提交回复
热议问题