Should I use the SVG gradients generated by Colorzilla for IE9?

前端 未结 2 1689
难免孤独
难免孤独 2021-02-15 16:20

I\'ve found http://www.colorzilla.com/gradient-editor/ to be great for generating CSS3 gradients. However, there\'s one thing about it which would be great if someone could clar

相关标签:
2条回答
  • 2021-02-15 16:54

    IE9 does support IE6-8 filters although IE10 will not. You are right that IE9 does not support CSS3 gradients but IE10 will do so.

    Since IE9 does support IE6-8 filters colorzilla needs to turn off the IE6-8 filter when you put the SVG filter on the object. The IE6-8 filter is set using a filter property unlike the css filters that are set using the background property. The <head> addition therefore turns off the duplicate IE6-8 filter on IE9. Given the different property names the last selector matches rule does not apply.

    This code should be faster than regular image fallback as the SVG code can be hardware accelerated. The SVG code won't affect other browsers as the last selector matches, that's why the legacy browser line is at the top.

    0 讨论(0)
  • 2021-02-15 16:56

    The IE9 SVG gradient works well, but IE7 considers it to be unsecured content. So if you secure your site with this styling behind SSL/HTTPS, IE7 users will get the "This page contains both secure and nonsecure items." I pulled this section into a conditionally included CSS file to keep IE7 from barking.

    0 讨论(0)
提交回复
热议问题