IE8:div hover只有在设置背景颜色时才工作,很奇怪,为什么? [英] IE8: Div hover only works when background color is set, very strange, why?
问题描述
情况:有按钮图片的div。 Div需要在悬停时淡出。适用于所有浏览器,Internet Explorer除外。当我给div一个背景颜色它突然起作用。
检查: http://ListAndPlay.com ,左上角是控件。
悬停将无法在IE中工作,尝试添加背景颜色到#buttons,它突然起作用。 / p>
问题:原因是什么?如何正确解决这个问题?
我最近也遇到了这个问题。我也解决了它通过添加1×1 px透明背景图片到悬停元素。我觉得以后洗澡。
Situation: Got a div with buttons images. Div needs to fadeIn on hover. Works in all browsers, except Internet Explorer. When I give the div a background color it suddenly works.
Check: http://ListAndPlay.com , top left are the controls.
The hover won't work in IE, try to add a background color to #buttons and it suddenly works.
Question: What is the reason for this? How to fix this properly?
I recently ran in to this problem also. I also solved it by adding a 1 by 1 px transparent background image to the hover element. I felt like taking a shower afterwards.
这篇关于IE8:div hover只有在设置背景颜色时才工作,很奇怪,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!