我已经创建了两个表父表和它的子表,我想为两个表使用不同的 CSS 但问题是子表也在加载父表的 css 所有我希望我的子表应该有白色背景,我试过 子表的内联样式
,#ID
,.Class
子表的明智样式,但我无法像我一样将背景设置为白色能够用我的 css 改变它的字体大小,请告诉我有没有办法让子表使用它自己的派生 css?
在下图中,ABC 是父表,弹出框内有一个标题为 Top events
的子表:
最佳答案
试试这个:
CSS
.parent-table {
/* styling for the parent table */
}
.parent-table .child-table {
/* styling for the child table */
}
HTML
<table class="parent-table">
<tr><td><table class="child-table">...</table>...</td></tr>
...
</table>
关于html - 忽略父级 CSS 以更改子级的背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13869202/