CSS last-child selector: select last-element of specific class, not last child inside of parent?

前端 未结 6 713
夕颜
夕颜 2020-11-22 01:45
6条回答
  •  广开言路
    2020-11-22 02:36

    What about this solution?

    div.commentList > article.comment:not(:last-child):last-of-type
    {
        color:red; /*or whatever...*/
    }
    

提交回复
热议问题