alloohaa alloohaa - 5 months ago 18
CSS Question

Using "ellipse" as gradient for IE-9

I've created radial-gradient

background: radial-gradient(ellipse at center, #595959 0%, #000000 40%);


And as far as I know, this should help me to make it cross-browser

background: -webkit-radial-gradient(ellipse at center, #595959 0%, #000000 40%);
background: -moz-radial-gradient(ellipse at center, #595959 0%, #000000 40%);
background: -ms-radial-gradient(ellipse at center, #595959 0%, #000000 40%);
background: -o-radial-gradient(ellipse at center, #595959 0%, #000000 40%);
background: radial-gradient(ellipse at center, #595959 0%, #000000 40%);


However this isn't support IE-9 and after some searching, I found this:
Create a radial gradient for Internet Explorer 6/7/8 but this doesn't seem to work anymore. And well, I'm curious how to make my gradient work in IE-9. Thanks

Answer

I think I have bad news for you.

IE9 dropped support for the old IE-specific filter styles -- ie the ones that you pointed out in the other question you linked to.

The intention was that IE9 was supposed to be properly standards compliant, and those filter styles were non standard so they were dropped. At the same time, the idea was all the functionality provided by those styles was being replaced by standards-based CSS features.

Unfortunately, as you're finding, not quite all of the functionality was replaced with standard CSS in IE9. In particular, CSS gradients were a noticeable omission and have caused a lot of code to be written using awkward work-arounds.

The bottom line is that IE9 specifically has a particular blind-spot in this area, where newer IE versions and even the older ones do support this feature one way or another.

Your only real ray of light is that IE9 usage has dropped through the floor recently; hardly anyone is still using it. So my advice is that you can probably get away with having a fall-back solution that just uses a plain background colour; let IE9 have that and concentrate on the newer browsers that people do actually use.

Comments