优先级怎么算

65 阅读1分钟
1.优先级一样时下面的代码会将上面的代码覆盖
2.伪类=class
3.important! > 行间样式 > id > class > 标签 > 通配符
.div1 .p1 .span1 {
    color: green;
}

.div1 .p1 .span1:hover {
    color: blue;
}

.div1 .span1:hover {
    color: blue;
}