BG图像鼠标悬停工作正常,在IE上除外



希望你能帮助我:-)

我的html代码在Google Chrome和Firefox中运行良好,但在IE10中则不行。任何人都可以看到代码中的问题吗?

我的网站:http://produkt-guiden.dk/testside2

我的代码:

<style type="text/css">
#cell1 {
  width: 610px;
  height: 1000px;
  vertical-align: middle;
  background-image: url(/media/wysiwyg/guiden1.png)
}
#cell1:hover {
  background-image: url(/media/wysiwyg/guiden0.png)
}
</style>
</head>
<body>
<table border="0">
<tbody>
<tr>
    <td id="cell1"><iframe src="myiframeurlcode" frameborder="0" scrolling="auto" marginheight="0" allowtransparency="true" width="610px" height="1500px">iframe not supported!</iframe></td>
</tr>
</tbody>
</table>

看起来IE10在悬停时的背景颜色/图像存在问题(在这里讨论)。我建议使用 JavaScript 在 mouseenter 和 mouseleave 上按名称"悬停"来添加/删除类。在 css 更改中

 #cell1:hover {
  background-image: url(/media/wysiwyg/guiden0.png)
 }

 #cell1.hover {
  background-image: url(/media/wysiwyg/guiden0.png)
 }

最新更新