سؤال

Short of it is, I'm trying to scale the background image to 100%.

I came across the filter that achieves that goal, however I cant seem to get it to work in ie 7/8. Code is below.

  body {
background-image: url(../images/background.gif);
background-size: 100% 100%;
height: 100%;
width: 100%;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/background.gif', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/background.gif', sizingMethod='scale')";
}

Thank you

هل كانت مفيدة؟

المحلول

Background-size attributes are not very flexible on cross-browser compatibility. It doesn't work because 'background-size' is not supported bellow IE9:

http://caniuse.com/background-img-opts

Check this post for more detailed information: http://css-tricks.com/perfect-full-page-background-image/

I suggest you find another solution to make this more compatible.

نصائح أخرى

Have you tried adding a

<meta http-equiv="X-UA-Compatible" content="IE=8" />

to the <head> tag .

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top