有以下HTML:
<li class="tabs__item tabs__item_with_new_orders">123</li>我想做以下几件事:
Firebug向我展示了这个类的成功应用:
.tabs__item:nth-child(4n+2) {
background: none repeat scroll 0 0 #89c4bb;
}我的课在Firebug上被划过了!并没有应用"tabs__item_with_new_orders“的背景属性。我怎么才能修好它?我可以使用“!重要”属性来设置优先级,但我不想这样做。
发布于 2014-09-01 09:44:25
使用
.tabs__item:nth-child(4n+2) {
background: none repeat scroll 0 0 #89c4bb;
}
.tabs__item.tabs__item_with_new_orders {
background: #000;
}这样的话,背景应该是黑色的,因为它会被覆盖。
发布于 2014-09-01 09:59:45
在类和id中避免解写。为什么?:
https://stackoverflow.com/questions/25602898
复制相似问题