我正在表上设置:hover
属性以更改悬停时的行颜色。在CHROME和EDGE上工作正常,但在IE 11上却无法正常工作。
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
和
<meta http-equiv='X-UA-Compatible' content='IE=9; IE=10; IE=11;IE=8; IE=7; IE=EDGE'/>
CSS部分:
tr.fullrow:hover{
background:yellow;
font-size:16px;
}
HTML部分:
<table border = "1" class ="tablewip">
<caption> Assy WIP by Product </caption>
<thead>
<tr class ="headerrow">
<td class="headercells" font-size:100px; nowrap >'.$colHeader.'</td>
</tr>
</thead>
<tbody>
<tr class = "fullrow">
<td class = "wipcells" nowrap >Text </td>
</tr>
</tbody>
</table>
堆栈片段
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='X-UA-Compatible' content='IE=9; IE=10; IE=11;IE=8; IE=7; IE=EDGE' />
<style>
tr.fullrow:hover {
background: yellow;
font-size: 16px;
}
</style>
</head>
<body>
<table border="1" class="tablewip">
<caption> Assy WIP by Product </caption>
<thead>
<tr class="headerrow">
<td class="headercells" font-size:100px; nowrap>'.$colHeader.'</td>
</tr>
</thead>
<tbody>
<tr class="fullrow">
<td class="wipcells" nowrap>Text </td>
</tr>
</tbody>
</table>
</body>
</html>
答案 0 :(得分:-2)
答案 1 :(得分:-2)
我将样式设置为 td 而不是 tr 。例如:
tr.fullrow:hover td{
background:yellow;
font-size:16px;
}