How do I choose the last 2 items in a list with css nth-child?

后端 未结 4 589
不知归路
不知归路 2021-01-31 08:29

Is it possible? If not, is there a way to do it with jQuery?

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 09:01

    :last-child,
    :nth-last-child(2) {
      ruleset
    }
    

    will play as well.

提交回复
热议问题