当前位置: 代码迷 >> 跨浏览器开发 >> 关于IE6上层的透明有关问题
  详细解决方案

关于IE6上层的透明有关问题

热度:523   发布时间:2013-01-07 10:02:24.0
关于IE6下层的透明问题
本帖最后由 duck530 于 2011-07-14 00:00:14 编辑

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


.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;
------解决方案--------------------
<!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>
  相关解决方案