1、内联样式(inline style) > ID选择符 > 类选择符(class), 伪类(pseudo-class)和属*(attribute)选择符 > 类别(type),伪对象(pseudo-element)

2、如果定义了重复的属性值,以最后定义的为准,如果应用了两个或多个样式名,里面不重复定义的 属性值就追加上去,重复的属性值就以最后一个为准。

 

#cssTest{
    background-color:red;
    text-indent:100px;
}
#cssTest{
    background-color:green;
}

最后得到的是

#cssTest{
    background-color:green;
    text-indent:100px;
}