firefox与IE透明度(opacity)设置区别-创新互联
IE:
filter:alpha(opacity=sqlN)
其中 sqlN的值域为[0, 100]
网站名称:firefox与IE透明度(opacity)设置区别-创新互联
文章转载:http://pwwzsj.com/article/cceids.html
filter:alpha(opacity=sqlN)
其中 sqlN的值域为[0, 100]

js: ieNode.style.filter="alpha(opacity=sqlN)";
Firefox,Chrome和Safari:
opacity:sqlN
其中sqlN的值域为[0, 1]
js: firefoxNode.style.opacity=sqlN;
测试代码如下:
.ieCss{
display:-moz-inline-box;
display:inline-block;
width:100;
height:100;
background-color:red;
filter:alpha(opacity=20); }
.fireFoxCss{
display:-moz-inline-box;
display:inline-block;
width:100;
height:100;
background-color:blue;
opacity:0.5; } IE_cssfirefox_css
IE_Jsfirefox_Js
补充:参考资料中对firfox还有3.5之前和3.5之后版本的区分,暂时忽略。
参考文档:
http://hi.baidu.com/hanserv/item/ac31a23f0c578bffdf222114
网站名称:firefox与IE透明度(opacity)设置区别-创新互联
文章转载:http://pwwzsj.com/article/cceids.html