How to make SVG work with IE?

前端 未结 5 2067
广开言路
广开言路 2020-12-13 20:55

Does anybody know of a comprehensive library to make SVG work with IE (7 and 8 in particular)?

I wanted something Javascript which could be included in my web page a

5条回答
  •  鱼传尺愫
    2020-12-13 21:05

    A more low tech solution would be to use something like svg_alike (insert conflict of interest notification here :)). It checks for the SVG support, then if it doesn't find it it replaces all SVG images with PNGs.

    https://github.com/forwardadvance/svg_alike

    You lose the advantages of smooth vector zooming, and retina support, but IE8 users are unlikely to make use of these features anyway.

    The advantage is that you don't have to convert your images into JavaScript. I think it provides 80% of the value for 5% of the work.

提交回复
热议问题