CSS how to use pseudo-class :not with :nth-child

前端 未结 2 866
南旧
南旧 2021-01-07 16:28

Is is possible to use :not() with nth-child ?

I tried something like this without any luck :

td:not(:nth-child(4n)){
  te         


        
2条回答
  •  清歌不尽
    2021-01-07 16:42

    Instead of using "not", the default approach in CSS is to override styles:

    td {
        text-align: center;
    }
    td:first-child {
        text-align: left;
    }
    

提交回复
热议问题