In my research, there were several ways to insert SVG images inside an html page. Use <img>is the simplest but unable to colorize the icons, which is my basic need. So I read about usage <object>, but that still doesn't allow me to style it with the css fill command. Putting the bulk of the data is <svg>also unacceptable, since I want to use images as recorded images.
I also read about jQuery solution, but I am using angularJS.
So, I read a lot about the capabilities of SVG Icons and how much better they are than about legacy PNG-Sprite or IconFonts scripts. but unfortunately I can’t find a good link to use it. Can someone help me here?
tried this already, it doesn't work:
HTML:
<object data="your.svg" type="image/svg+xml" id="myImage"></object>
CSS
#myImage {
fill: #fff;
}
Yaniv source
share