Html Angularjs表N类型
我试图使用类型的第n个来更改angularjs表中包含行索引号的圆的背景色 htmlHtml Angularjs表N类型,html,css,angularjs,css-selectors,Html,Css,Angularjs,Css Selectors,我试图使用类型的第n个来更改angularjs表中包含行索引号的圆的背景色 html 我可以让tr改变颜色和td,但我不能让count circle类改变颜色,有人能帮忙吗?您正在重复tr,因此您的代码应该是这样的: .section-table tr:nth-of-type(5n+1) td div.count-circle { background-color: blue; } .section-table tr:nth-of-type(5n+2) td div.count-cir
我可以让tr改变颜色和td,但我不能让count circle类改变颜色,有人能帮忙吗?您正在重复
tr
,因此您的代码应该是这样的:
.section-table tr:nth-of-type(5n+1) td div.count-circle {
background-color: blue;
}
.section-table tr:nth-of-type(5n+2) td div.count-circle {
background-color: yellow;
}
.section-table tr:nth-of-type(5n+3) td div.count-circle {
background-color: black;
}
杰出的。谢谢您!
.section-table tr td div.count-circle:nth-of-type(5n+1) {
background-color: blue;
}
.section-table tr td div.count-circle:nth-of-type(5n+2) {
background-color: yellow;
}
.section-table tr td div.count-circle:nth-of-type(5n+3) {
background-color: black;
}
.section-table tr:nth-of-type(5n+1) td div.count-circle {
background-color: blue;
}
.section-table tr:nth-of-type(5n+2) td div.count-circle {
background-color: yellow;
}
.section-table tr:nth-of-type(5n+3) td div.count-circle {
background-color: black;
}