Problem with odd/even child elements in nth-child

前端 未结 2 1978
闹比i
闹比i 2020-12-06 10:40

I have a web site like this:



    
    

        
2条回答
  •  南笙
    南笙 (楼主)
    2020-12-06 11:23

    div > :nth-child(3)     the third child of a div element
    div > :nth-child(even)  every even child of a div element
    div > :nth-child(odd)   every odd child of a div element
    div > :nth-child(3n)    every third child of a div element
    

提交回复
热议问题