Can I color table columns using CSS without coloring individual cells?

前端 未结 8 469
不思量自难忘°
不思量自难忘° 2020-12-12 13:07

Is there a way to color spans of columns all the way down. See, starting example below:

8条回答
  •  暖寄归人
    2020-12-12 14:01

    My version using nth-child expressions:

    Using the CSS concept of cascade rules to first coloring the cells and then to uncolor the ones i want to be transparent. The first selector selects all the cells after the first one, and the second one selects the fifth cell to be transparent.

    
    
    
    Motor Engine Car Body
    1 2 3 4 5 6 7
    7 1 2 3 4 5 6

    Check this interesting reference: http://learn.shayhowe.com/advanced-html-css/complex-selectors/

提交回复
热议问题