Apply style to only first level of td tags

后端 未结 7 1779
执念已碎
执念已碎 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:58

    I guess you could try

    table tr td { color: red; }
    table tr td table tr td { color: black; }
    

    Or

    body table tr td { color: red; }
    

    where 'body' is a selector for your table's parent

    But classes are most likely the right way to go here.

    0 讨论(0)
提交回复
热议问题