How to show the first N elements of a block and hide the others in css?

前端 未结 4 1279
野趣味
野趣味 2020-12-05 06:22

I am trying to hide the first 3 elements having the class .row inside the block .container.

What I\'m doing is hiding all the .row

4条回答
  •  一个人的身影
    2020-12-05 07:06

    I found this answer by Googling "css show first n elements", but the question now seems to be the opposite (hiding first n elements)

    :nth-child(n+4)
    

    ^ this will work if you're looking for what I was looking for

提交回复
热议问题