I’ve find many questions regarding IE9 not rendering background-image but cannot find a solution that fit my needs.
I use a CSS3 gradient generator for my background and that works ok for all modern browsers except in IE9.
The code im using is:
body {
background-size: cover;
background-repeat: no-repeat;
background-image: linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -o-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -moz-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -webkit-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -ms-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.49, rgb(184,190,227)),color-stop(0.8, rgb(118,135,250)));
}
Ive setted a jsFiddle page: http://jsfiddle.net/nUA98/
So, if anyone knows why it is not working in IE9, comment/answer will be greatly appreciated.
Thank you.
It’s not that IE9 doesn’t render background images, it’s just that, if you want to use a gradient in IE9, you have to use SVG. Create your gradient using ColorZilla, and make sure to check the “IE9 support” option at the end. It automatically generates a data-uri SVG for you to use, without having to actually use an image file.