Home › Forums › CSS › how to fully stretch background image that works in IE?? › Re: how to fully stretch background image that works in IE??
December 5, 2012 at 6:01 am #116362
In modern browsers you can now use the CSS3 property background-size
/* will stretch the image so that it covers all of the element */
/* will stretch the image so that it fits perfectly inside the element */
This allows to achieve background stretching while preserving the aspect ratio of the background-image: https://developer.mozilla.org/en-US/docs/CSS/background-size
I’ve personally developed a polyfill that implements those properties in IE8: https://github.com/louisremi/background-size-polyfill