Home > Web Front-end > HTML Tutorial > CSS setting div transparency-FF3.5 is no longer supported-moz-opacity_html/css_WEB-ITnose

CSS setting div transparency-FF3.5 is no longer supported-moz-opacity_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:28:32
Original
1343 people have browsed it

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

The layer background is semi-transparent, and the font color is also semi-transparent

< span style="position:relative;color:yellow">Layer background is semi-transparent, font Color is not translucent& lt;/div>


Redirect: http://www.psdiv.com/11/49.html

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template