日期:2014-05-17  浏览次数:20767 次

关于IE6下层的透明问题
HTML code

<div iclass="divTest">
    <div class="divChild"></div>
    <img src="demo_files/sago.jpg" width="300" height="200" class="childImg" />
</div>


CSS code

.divTest{width:300px;height:200px;position:relative;}
.divChild{width:300px;height:200px;position: absolute;top:0px;left:0px;filter:alpha(opacity=50);opacity:0.5;background-color:white; z-index:100;}
.childImg{top:0px;left:0px;position:absolute;z-index:1;}


请问为什么我这段在IE6下为什么没有效果呢?

------解决方案--------------------
我也遇到这样的问题

你到
http://topic.csdn.net/u/20100521/17/512931E6-2500-4481-B4B9-88FE49422DA6.html
上看看能不能帮你
------解决方案--------------------
filter:Alpha(Opacity=90,Style=0); opacity:0.90;
------解决方案--------------------
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head runat="server">
  <title>Untitled Page</title>
  <style>
      .divTest{width:300px;height:200px;position:relative;}
.divChild{width:300px;height:200px;position: absolute;top:0px;left:0px;opacity:0.5;filter:alpha(opacity=50);background-color:white; z-index:100;}
.childImg{top:0px;left:0px;position:absolute;z-index:1;}

  </style>
</head>
<body>
  <div iclass="divTest">
    <div class="divChild"></div>
    <img src="demo_files/sago.jpg" width="300" height="200" class="childImg" />
</div>


</body>
</html>