Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Angularjs表N类型_Html_Css_Angularjs_Css Selectors - Fatal编程技术网

Html Angularjs表N类型

Html 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

我试图使用类型的第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-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;
}