答:使用Microsoft“ alpha筛选器”属性
opacity仅Internet Explorer 9及更高版本的浏览器支持CSS3属性。
但是,Internet Explorer 8和更早版本支持仅Microsoft的属性“ alpha过滤器”来控制元素的透明度。这是一个例子:
例试试这个代码»
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSS Opacity for IE8 and Lower</title>
<style>
p {
filter: alpha(opacity=50);
zoom: 1; /* Fix for IE7 */
opacity: 0.5; /* Standard Syntax */
}
</style>
</head>
<body>
<p><strong>Note:</strong> Alpha filters is Microsoft-only property to control transparency in IE8 and earlier version, however it creates invalid code in your CSS.</p>
</body>
</html>
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h61093.shtml