无法将 css 应用于两个不同的表
Not able to apply css to two different tables
我想创建两个 table 不同风格的
我使用了两个 类 并以不同的方式命名它们,但是在为 css 编码之后
css 不工作,或者相同的 css 样式被应用到两个 table 中。
例如:如果我将边界线设置为第一个 table,它也会应用于另一个 table。
The Code
table.ssc table,th,td {
properties...
}
您所定位的 "th" 和 "td" 选择器并不具体,这就是样式被应用到 table 的原因。在这里您可以更具体地选择
.ssc td,
.ssc th,
.ssc.table {}
.hsc td,
.hsc th,
.hsc.table {}
希望对您有所帮助
我想创建两个 table 不同风格的
我使用了两个 类 并以不同的方式命名它们,但是在为 css 编码之后 css 不工作,或者相同的 css 样式被应用到两个 table 中。
例如:如果我将边界线设置为第一个 table,它也会应用于另一个 table。
The Code
table.ssc table,th,td {
properties...
}
您所定位的 "th" 和 "td" 选择器并不具体,这就是样式被应用到 table 的原因。在这里您可以更具体地选择
.ssc td,
.ssc th,
.ssc.table {}
.hsc td,
.hsc th,
.hsc.table {}
希望对您有所帮助