IE8:div hover只有在设置背景颜色时才工作,很奇怪,为什么? [英] IE8: Div hover only works when background color is set, very strange, why?

查看:119
本文介绍了IE8:div hover只有在设置背景颜色时才工作,很奇怪,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情况:有按钮图片的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆