Home >Web Front-end >HTML Tutorial >CSS setting div transparency-FF3.5 is no longer supported-moz-opacity_html/css_WEB-ITnose
Make div transparent, compatible with IE FF
transparent_class {filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5; opacity: 0.5;}
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
But FireFox 3.5 no longer supports -moz-opacity
said in https://developer.mozilla.org/En/CSS:-moz-opacity It's very clear:
Note: Firefox 3.5 and later do not support -moz-opacity. By now, you should be using simply opacity.
Now you should use the opacity attribute instead.
So to set a DIV with a transparency of 60%, you should write it like this:
div.transp { /* make the div translucent */
opacity: 0.6; /* Firefox, Safari( WebKit), Opera)
filter: "alpha(opacity=60)"; /* IE 8 */
filter: alpha(opacity=60); /* IE 4-7 */
zoom: ; However, Microsoft IE8 does not yet support this attribute.
NetEase mailbox currently also uses -moz-opacity, so when "empty spam" the screen goes black.
The DIV background is translucent, and the text in the DIV is not translucent