Line Numbers every nth Line with CSS Counters?

前端 未结 2 1366
旧巷少年郎
旧巷少年郎 2021-01-11 16:03

I had to cut out certain referring links (italicized) as I don\'t have enough reputation yet, but can perhaps replace them later.

I\'ve created a jQuery plug-in that

2条回答
  •  走了就别回头了
    2021-01-11 16:26

    For problem 2, if the class="fallback" in your fiddle is there to stay, and not just part of the explanation of the problem, you can use that as the solution: dispense with the nth-child(5n) and use the fallback as an indicator if the line count should show or not.

    See updated jsFiddle.
    I inserted a line in there that's not part of the poem, to see if it works, and it does: you can remove the line and the rest will remain synchronised.

提交回复
热议问题