开发者

How do i select the 1st and then every 4th row in a html-table with nth-child()-selector? [duplicate]

This question already has answers here: Select every Nth element in CSS (4 answers) 开发者_JS百科 Closed 7 years ago.

Ok, math isn't my strong side, I admit it.

All I want to do is to select the first, 5th, 9th, 13th, 17th etc row in a html-table. Can anybody with better math-skills point me in the right directionor perhaps supply a "nth-child-for-dummies" guide?

I tried nth-child(1n+4) (which selects the 4th row and everyone after), and i also tried nth-child(0n+4) which selects the fourth row and nothing after that.


Shoulb be something like

tr:nth-child(4n+1) {
  declarations
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜