案例:CSS3 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style> 
5
div
6
{
7
background-color:red;
8
opacity:0.5;
9
filter:Alpha(opacity=50); /* IE8 以及更早的浏览器 */
10
}
11
</style>
12
</head>
13
<body>
14
15
<div>本元素的不透明度是 0.5。请注意,文本和背景色都受到不透明级别的影响。</div>
16
17
</body>
18
</html>
19