4
我有一个表#good-table。 我能加入到这个表中的所有内容(一,DIV,IMG,TD,日...)像按ID添加样式
*, *::before, *::after {
box-sizing: border-box;
}
但仅此表和内容在此表中。
感谢
我有一个表#good-table。 我能加入到这个表中的所有内容(一,DIV,IMG,TD,日...)像按ID添加样式
*, *::before, *::after {
box-sizing: border-box;
}
但仅此表和内容在此表中。
感谢
这应做到:
#good-table, #good-table * {
box-sizing: border-box;
}
#good-table *
将覆盖::before
和::after
伪元素,但如果你要选择他们明确你可以使用#good-table::before
,#good-table *::before
等
谢谢,但是如何在这之后添加:: before和:: after? – Zarkoeleto
你应该不需要它,因为它们被'#good-table *'覆盖。但是语法是'#good-table,#good-table *,#good-table :: before,#good-table * :: before,#good-table :: after,#good-table * :: after ' – CupawnTae
是的,它的工作原理。非常感谢! – Zarkoeleto