内容摘要:IE和FireFox下透明度的设置区别FireFox下透明度设置的方法是:opacity=opacityValue;opacityValue的取值范围是【0.0~1.0】即0到1的小数IE下透明度设置的方法是:filter:alpha(opacity=opacityValue);opacityValue的取值范围是【0~100】即0到100的整数以下是firefox下的透明度设置例子ffopacity.html!DOCTYPEHTMLPUBLIC-//W3C//DTDHTML4.01Transitional//ENhtmlheadtitleffopacity.html/titlemetahttp-equiv=content-typecontent=text/html;charset=UTF-8styletype=text/cssmedia=all#p1{opacity:0.2;}#p2{opacity:0.4;}#p3{opacity:0.6;}#p4{opacity:0.8;}#p5{opacity:1;}p{width:200px;height:100px;background-color:green;}/style/headbodypid=p1opacity:0.2;不透明度为20%/ppid=p2opacity:0.4;不透明度为40%/ppid=p3opacity:0.6;不透明度为60%/ppid=p4opacity:0.8;不透明度为80%/ppid=p5opacity:1;不透明度为100%/pbr/br/blockquoteIE不支持此属性,请使用Firefox或者Opera浏览./blockquote/body/html以下是IE下的透明度设置例子ieopacity.html!DOCTYPEHTMLPUBLIC-//W3C//DTDHTML4.01Transitional//ENhtmlheadtitleieopacity.html/titlemetahttp-equiv=content-typecontent=text/html;charset=UTF-8styletype=text/cssmedia=all#p1{filter:alpha(opacity=20);}#p2{filter:alpha(opacity=40);}#p3{filter:alpha(opacity=60);}#p4{filter:alpha(opacity=80);}#p5{filter:alpha(opacity=100);}p{width:300px;height:100px;background-color:green;}/style/headbodypid=p1filter:alpha(opacity=20);不透明度为20/ppid=p2filter:alpha(opacity=40);不透明度为40/ppid=p3filter:alpha(opacity=60);不透明度为60/ppid=p4filter:alpha(opacity=80);不透明度为80/ppid=p5filter:alpha(opacity=100);不透明度为100/pbr/br/blockquoteIE下的属性/blockquote/body/html