2011-01-20 69 views
1

我正在使用淡入和淡出淡出梯度png为了阅读文本,它是一个PNG-24代码是非常简单但IE8不会褪色,它只是弹出和弹出出 $(文件)。就绪(函数(){Fadein FadeOut不能在IE8中工作

 $('#menu').hover(function() { 
      $('#gradient').fadeIn('slow'); 
     }, function() { 
      $('#gradient').fadeOut('fast'); 
     }); 
    });  
+0

CSS不透明度 “伪造” IE中使用阿尔法滤波器。 .. * *可能是你可能无法克服的东西 – scunliffe 2011-01-20 11:44:34

回答

0
<html> 
<head> 
<title>Test Page</title> 
<script src="http://code.jquery.com/jquery-latest.js"></script> 
<script type="text/javascript"> 
$(document).ready(function(){ 
$('#menu').hover(function() { 
     $('#gradient').fadeIn('slow'); 
    }, function() { 
     $('#gradient').fadeOut('fast'); 
    }); 
}); 
</script> 
</head> 

<body> 
<div id="menu" style="background:red; height:200; width:200px;"> 

<input type="file" id="gradient" style="display:none" /> 

</div> 

</body> 
</html> 

其工作细........

+0

这不是使用** PNG **图片......我认为这就是@goetzs的问题fadeIn/fadeOut来自于。基本淡入/淡出在IE6/IE7/IE8中正常工作。 – scunliffe 2011-01-20 11:47:46