jjshell — 2011-07-14T16:14:11-04:00 — #1
I'd like a .svg image as an icon image. I work with dys- kids, and icons are very useful. Also, sometimes, we have to zoom on the page. .png gets all blurry. Enters a .svg image.
Good idea? Bad idea? Pros and cons?
xhtmlcoder — 2011-07-15T06:08:49-04:00 — #2
It depends upon native browser support on the whole I would suspect plus usually SVG is embedded via the OBJECT though you could always have PNG fall-back. So file size might be the other issue. It depends upon how you want to use this icons too, for example are they interactive?
jjshell — 2011-07-15T10:33:31-04:00 — #3
No, they're not interactive.
xhtmlcoder, I must admit that I wouldn't know how to embed via the object tag. Would you be kind enough to post some code?
Also, how would you set up a fall back?
xhtmlcoder — 2011-07-16T05:59:34-04:00 — #4
You can also embed SVG in XHTML using XML namespaces but the generic OBJECT method for a SVG object would be something loosely like the following using the typical standard OBJECT attribute values.
<object data="example.svg" width="200" height="200" type=
<img src="example.png" alt="Example Fallback image" />