CSS设置元素透明度
来自:http://blog.csdn.net/wyg27/archive/2008/02/03/2080065.aspx
在Firefox中设置元素透明度:-moz-opacity
摘要
在基于Gecko引擎的浏览中(Firefox、Mozilla), -moz-opacity 用于定义一个元素的透明度。
-moz-opacity: number | inherit ;
0 (或更少)
元素完全透明 (invisible)
0 < number < 1
元素透明 (背景可见)
1 (或更多)
元素完全不透明 (solid)
hbox.example {
-moz-opacity: 0.5; /* see the background through the hbox */
}
IE下
filter:alpha(opacity=20); /* IE 透明度20% */
在基于Gecko引擎的浏览中(Firefox、Mozilla), -moz-opacity 用于定义一个元素的透明度。
语法
-moz-opacity: number | inherit ;
赋值
0 (或更少)
元素完全透明 (invisible)
0 < number < 1
元素透明 (背景可见)
1 (或更多)
元素完全不透明 (solid)
范例
hbox.example {
-moz-opacity: 0.5; /* see the background through the hbox */
}
IE下
filter:alpha(opacity=20); /* IE 透明度20% */
浙公网安备 33010602011771号