HTML table colgroup element not working?

后端 未结 7 2228
无人及你
无人及你 2021-01-03 18:25

I want different styles on each column of a table. I\'ve read that you could do that by using or , but I had no luck. I

7条回答
  •  误落风尘
    2021-01-03 18:54

    You could use css selectors to get similar results without adding extra classes.

    As an example if you want to give specific style to a second column you can use:

    table>tbody>td:nth-child(2){font-weight: bolder;}
    

提交回复
热议问题