chris

平平安安
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% */

posted on 2009-03-20 17:44  chrisfu  阅读(542)  评论(0)    收藏  举报