Problem with opacity in IE8

前端 未结 2 1632
轮回少年
轮回少年 2021-01-06 17:58

I try to solve a problem that appears in IE8. Html is very simple:

2条回答
  •  误落风尘
    2021-01-06 18:02

    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.

提交回复
热议问题