Apply style to only first level of td tags

后端 未结 7 1782
执念已碎
执念已碎 2020-12-13 03:29

Is there a way to apply a Class\' style to only ONE level of td tags?



7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 03:51

    how about using the CSS :first-child pseudo-class:

    .MyClass td:first-child { border: solid 1px red; }
    

提交回复
热议问题