兼容ie firefox 半透明效果
<!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">
<head>
<meta http-equiv="Content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>兼容ie firefox 半透明效果</title>
<style type="text/css">
.b{
opacity: 0.50;
filter : progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50,finishOpacity=100);
}
</style>
</head>
<body style="background-color: #C0C0C0">
<div style="width: 423px; height: 147px; background-color: #990099; position: absolute; left: 136px; top: 41px;">
后面的层</div>
<div class="b" style="width: 423px; height: 147px; background-color: #0066CC; position: absolute; left: 174px; top: 57px;">
半透明</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>兼容ie firefox 半透明效果</title>
<style type="text/css">
.b{
opacity: 0.50;
filter : progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50,finishOpacity=100);
}
</style>
</head>
<body style="background-color: #C0C0C0">
<div style="width: 423px; height: 147px; background-color: #990099; position: absolute; left: 136px; top: 41px;">
后面的层</div>
<div class="b" style="width: 423px; height: 147px; background-color: #0066CC; position: absolute; left: 174px; top: 57px;">
半透明</div>
</body>
</html>
代码折叠有点问题,我重新用这种模式应该拷出代码时就不会有问题了