Style every thing except first child

后端 未结 4 1991
眼角桃花
眼角桃花 2021-01-21 02:16

I know of the selector :not() but it doesn\'t work, like tr:not(tr:first-child):hover. I want to style the other trs but not the first one

4条回答
  •  暖寄归人
    2021-01-21 03:07

    Put your headers in a and your stylable rows in the then use:

    tbody tr:hover { background: red }
    

    and it won't matter what the contents is.

    http://jsfiddle.net/stevemarvell/we4a6/

提交回复
热议问题