我有一个带有div元素的html页面。它实际上是在打开modalpopup时隐藏页面的CSS。它在Firefox中工作正常,但在IE 6中没有。任何人都可以建议。
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.overlay1
{
position: fixed !important;
background-color: #000;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
padding: 0;
margin: 0;
filter: alpha(opacity=20);
opacity: 0.2;
-moz-opacity: 0.2;
-khtml-opacity: 0.2;
-webkit-opacity: 0.2;
z-index: 10004;
}
</style>
</head>
<body>
<div class="overlay1">
</div>
</body>
</html>
答案 0 :(得分:1)
首先:IE6不支持position:fixed;
可能的解决方案:
* html .fixedBlock{
position: absolute;
top: expression(eval(document.body.scrollTop) + "px");
}
另一个问题 - 据我所知,IE 6的不透明度应该设置如下:
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);