问题:
Is it possible to select, say, every fourth element in a set of elements? 例如,是否可以选择一组元素中的每个第四个元素?
Ex: I have 16 <div>
elements... I could write something like. 例如:我有16个<div>
元素...我可以写类似的东西。
div:nth-child(4),
div:nth-child(8),
div:nth-child(12),
div:nth-child(16)
is there a better way to do this? 有一个更好的方法吗?
解决方案:
参考一: https://stackoom.com/question/EWhW参考二: Select every Nth element in CSS