CSS背景颜色给我带来了问题。样式块需要使用“.land.custom_one”而不是普通的“.custom_one”来工作。从td级去除“土地”也使它工作,但我需要“土地”类悬停工作,因为它不是所有需要悬停效果的tds。 样式块正在定义在style.css之后。 Chrome和Firefox都有这个问题。CSS背景颜色挑剔
style.css
#id table {
background-color: blue;
}
#id td.land {
background-color: green;
}
#id td.land:hover {
background-color: black;
color: orange;
}
style block
.custom_one {
background-color: red;
color: white;
}
html
<td class="land custom_one"></td>
解决方案是将块样式定义为“.custom_one,#id td.land.custom_one”。 – Kim 2010-06-22 08:22:54