This SVG sprite was created with Fontastic
http://yoursite.com/images/icons.svg
<svg class="icon-twitter"><use xlink:href="#icon-twitter"></use></svg>
/images/icons.svg
. So now the twitter icon markup could look like this:<svg class="icon-twitter"><use xlink:href="/images/icons.svg#icon-twitter"></use></svg>
[class^="icon-"], [class*=" icon-"] {
height: 32px;
width: 32px;
display: inline-block;
fill: currentColor;
}
You can use height
and width
properties to control icon size. To define icon color use fill
property. Note: currentColor
keyword inherits the color value of a parent element.
Remember: with Icon Cloud you don't have to worry about IE capability, the sprite file and other stuff. We'll take care of all of that for you, just click the "Publish" button and give it a try.