You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* :
a = 0 b = 0 c = 0 -> specificity = 0
li :
a = 0 b = 0 c = 1 -> specificity = 1
ul ol+li :
a = 0 b = 0 c = 3 -> specificity = 3
#x34y :
a = 1 b = 0 c = 0 -> specificity = 100
#s12:not(FOO) :
a = 1 b = 0 c = 1 -> specificity = 101
学习css的笔记,记录下css的种类以及权值的计算
css中选择器中的种类
如果外部样式,内部样式和内联样式同时作用于同一个元素,优先级如下:
选择器的优先权
选择器的权值计算如下
连接这三个数字abc,即得出选择器的权值,示例如下:
如果两个规则的权值相同,那么后定义的规则优先。
The text was updated successfully, but these errors were encountered: