使用以下 css,我定义了表头的第一列
table.search-transport tr th:nth-child(1) { width: 30px; text-align:right; }
我想不仅将这个 css 应用在头部,而且还应用在桌子的主体上。
我知道我们可以分两行进行:
table.search-transport tr th:nth-child(1),
table.search-transport tr td:nth-child(1)
{ width: 30px; text-align:right; }
但我想知道我们是否可以在 1 标志线中进行?就像是:
table.search-transport tr th:nth-child(1) + td:nth-child(1) { width: 30px; text-align:right; }
谢谢。