日期:2014-05-16  浏览次数:20552 次

如何能兼容ie6、7、8 设置backgroundColor成透明?
'background-color' 特性的默认值为 'transparent',即透明 但是在ie6\7\8下确不透明如何处理呢》?
------解决方案--------------------
<!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-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
.box{position:absolute;width:100px;height:100px;background:#000;opacity:0.5;filter:alpha(opacity:50);}
</style>
</head>

<body>
<div class="box">
</div>
<hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/>
<hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/>
<hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/>
<hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/><hr/>
</body>
</html>

------解决方案--------------------
不设置,默认是透明的。。。
或者用css 透明属性 opacity
再不行,使用margin设置外边距空开也可以啊
------解决方案--------------------
用滤镜把.......http://www.knowsky.com/442373.html