jQuery: Animating opacity in IE

后端 未结 3 767
轻奢々
轻奢々 2020-12-18 12:52

Using a div with solid black color to fade out an image underneath it. In Chrome and Firefox, this works fine, however, in IE, it\'s backwards.

$(\"div#bgcov         


        
3条回答
  •  半阙折子戏
    2020-12-18 13:11

    Opacity does not work in IE (older versions). You will need to animate the filter property:

    IE

    var val = .7;
    {filter: 'alpha(opacity = '+(val * 100)+')'}
    

提交回复
热议问题