在Firefox中设置元素透明度:-moz-opacity

来源:互联网 发布:石家庄怀特商城数据库 编辑:程序博客网 时间:2024/05/06 08:35
摘要

在基于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% */

参考:http://developer.mozilla.org/en/docs/CSS:-moz-opacity 
原创粉丝点击