如果一个类在另一个特定的类中,你如何重新定义它?
div.cls {
color:blue;
}
div.tst > div.cls {
color:red;
}
<div class="cls">test</div> // text color = blue
<div class="tst">
<div class="cls">test</div> // text color = red
<div>
<div class="cls">test</div> // text color = blue
</div>
<div>
如何让最后一个也变成红色?
cls
类不是直接从tst
继承的子类,该怎么办? - clarkk