SVG mouse events work in Firefox4 but not in IE8

半腔热情 提交于 2019-12-02 06:41:13

IE8 doesn't support SVG.

There are Javascript tools available to help with that, but natively it doesn't support it.

Of the tools I mentioned, my favourite is Raphael, but Raphael is a library for drawing the graphics; since you already have the SVG in your code, you may find a simple conversion library is more useful. Something like one of these perhaps: http://code.google.com/p/svg2vml/ or this: http://code.google.com/p/svgweb/

Since you say that the SVG images are working in your page, I would say that you're probably already using one or other of these tools (possibly one of the ones I linked above, possibly another one -- there's quite a few of them). But my guess would be that the tool you're using doesn't include support for manipulating the SVG object with Javascript.

You may therefore need to try another tool if you want this feature.

Stuart P. Bentley

As Spudley's answer says, IE8 doesn't support SVG.

If the image is appearing on your page, thereare a few possibilities:

  • Something in your development stack may be converting it to a raster image (such as a PNG): right click the image and select "Properties", then see what value is reported for "Type".
  • You may have a browser plugin installed that renders SVGs (but does not provide the JavaScript interface). Try running IE8 in Safe Mode.

Internet Explorer 9 does support SVG, however, so an IE upgrade, where possible, will solve that problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!