Css 按id向表中添加样式
我有一张好桌子。 我可以在这个表中的所有内容(a、div、img、td、th…)中添加以下内容吗Css 按id向表中添加样式,css,Css,我有一张好桌子。 我可以在这个表中的所有内容(a、div、img、td、th…)中添加以下内容吗 *, *::before, *::after { box-sizing: border-box; } 但仅适用于此表和此表中的内容 谢谢这应该可以做到: #good-table, #good-table * { box-sizing: border-box; } #good table*将涵盖:before和::after伪元素,但如果要显式选择它们,可以使用#good table:
*, *::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呢?您不应该需要它,因为它们在#good table*
中有介绍。但是语法应该是#good table,#good table*,#good table::before,#good table*::before,#good table::after,#good table*::after