I try to solve a problem that appears in IE8. Html is very simple:
-
IE8 doesn't support the CSS attribute opacity
you have to use an MS filter instead:
opacity: "0",
filter: alpha(opacity = 50); /*change value to suit your needs*/
That's not all though. This only works when the element is positioned, thankfully you have that already so it will work. For future reference if you don't have any position set, you can add zoom: 1
to the selector and it will work in IE :)
讨论(0)
-
I had the same issue. I did a lot of searching and reading and found IE8 doesn't use the css for opacity other browsers use. Here is my CSS that I used for IE8:
#loading-div-background {
display:none;
position:absolute;
top:0;
left:0;
background:gray;
width:100%;
height:100%;
/* Next 2 lines IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=75);
}
However, it still didn't work with position:fixed, but once I put in position:absolute it started working.
讨论(0)