How do I make background-size work in IE?

ghz 1years ago ⋅ 10039 views

Question

Is there any known way to make the CSS style background-size work in IE?


Answer

A bit late, but this could also be useful. There is an IE filter, for IE 5.5+, which you can apply:

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale');

-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale')";

However, this scales the entire image to fit in the allocated area, so if you're using a sprite, this may cause issues.

Specification: [AlphaImageLoader Filter @microsoft](http://msdn.microsoft.com/en- us/library/ms532969%28v=vs.85%29.aspx)