background gradients in IE7 with CSS

前端 未结 3 1494
轻奢々
轻奢々 2020-12-16 23:13

I am using the following bit of CSS to create a linear background gradient. It seems to work just fine in IE8/9, FF, Safari and chrome but not in IE7. IE7 shows a solid (gre

3条回答
  •  半阙折子戏
    2020-12-17 00:13

    In IE<=7, filters won't work unless element has layout.

    zoom: 1;
    

    Be aware that it can break other things, so old good background-image might be safe and reliable solution.

    Also please note that your CSS lacks gradient properties for Opera, IE10 and updated syntax for Webkit.

提交回复
热议问题