I’ve already written a number of articles on SVG, including this tutorial on animating icons with simple CSS and a tiny bit of jQuery. If you’re mostly unfamiliar with SVG implementation, it’s a good place to start. For some additional reading, take a look at this article here, which looks at the comparisons between SVG and icon-fonts.
However, the idea with this article is to provide a set of icons that any web designer or developer can use. Let’s take a look at how everything’s setup.
Please note, due a number of websites reposting/hosting this demo and content. We do not allow any of our content to be reposted or hosted elsewhere unless stated otherwise.
As you can see in the demo, there are 6 different sets of icons with various differences in styling and animation. All the styling and animation is done exclusively in CSS, externally from the inline SVG mark-up. If you take a look at the source files, you’ll notice I’ve separated all the styling into individual styles-sheets for the corresponding icon style.
Let’s take a look at the general document setup:
var SVGstring = "<!--SVG Mark-Up Goes Here-->"; $(SVGstring).appendTo('#DIV-NAME');
The HTML is pretty simple, the icons are injected into “”s with a class for general styling and an ‘id” for specific styling and the injection.
<span class="svg-icon ICON-CLASS-STYLE" id="INDIVIDUAL ID FOR INJECTION AND STYLING"></span>
The SVG mark-up contains all the classes and path data. By default, it contains CSS styling mark-up as well. However I’ve placed this in the style-sheets and applied some basic styling and animations. If you want to get more advanced with the animations, feel free to do so.
Lastly, the flat design icons were designed by Studio4 | Creative and are free for any use, credit goes to them for the design. However I slightly modified the original designs as well as converted them to SVG (amongst other things). That’s it really. Feel free to use them to your liking.
Please note, although I've designed this for easy implementation, you may need to make some minor adjustments in integrating it into your own set-up. Enjoy!