3 ms·
> Could anyone add info here. It works - desktop and mobile. I have recently successfully used inline SVG in IE10, Firefox, Chrome and Safari. I had issues, a
by artumi-richard 13y ago
> Could anyone add info here.
It works - desktop and mobile.
I have recently successfully used inline SVG in IE10, Firefox, Chrome and Safari. I had issues, and found bugs, but I also found workarounds fairly quickly.
I used the html5 doctype and the default Content-Type:
- gruseom 13y agoOh good. I had nightmares of not being able to still do this. Care to describe the bugs and workarounds?
- artumi-richard 13y agoWe wanted the SVG to be responsive, but altering the size of the svg itself didn't work well in all browsers. So we put it in a div and resized that and told the svg to fill the div. We have had to set the height on the div otherwise it defaults to the native height of the svg in some browsers, rather than the resized height. The svg did maintain it's proportions however. Also, we wanted to dome some simple onclick and onhover events on certain elements within the svg, and to do this we had to keep the <script></script> stuff outside the SVG because of safari. Interestingly having the javascript within the SVG worked well with the other browsers...
- gruseom 13y agoThanks! I came back to add a belated comment and am very glad to see your answer. My belated comment is that I just upgraded that code to HTML5 and it works fine.