Open ryelle opened 9 years ago
This does IE6+ support, but expects a set naming convention for the png icons. From the example, if your SVG markup is
<svg role="img" title="CodePen"><use xlink:href="spritemap.svg#codepen"></use></svg>
<svg role="img" title="YouTube"><use xlink:href="spritemap.svg#youtube"></use></svg>
<svg role="img" title="Twitter"><use xlink:href="spritemap.svg#twitter"></use></svg>
It replaces the #
with a .
, and adds the .png
:
<svg role="img" title="CodePen"><img src="spritemap.svg.codepen.png"></svg>
<svg role="img" title="YouTube"><img src="spritemap.svg.youtube.png"></svg>
<svg role="img" title="Twitter"><img src="spritemap.svg.twitter.png"></svg>
Since this embeds an <img>
, I'm not sure how we can do a hover/active state.
I'm not sure a hover/active state is super feasible or necessary for fallbacks.
Check out SVG for Everybody for IE 9+ support
Other options?