I suggest you use the <div>
element tag instead of <img>
so you can create a pseudo ::before
element in it. You can specify the css select to create the pseudo ::before
element, assign the background properties and apply the spin, viola!
You can see what I mean in your updated fiddle here.
Get additional information here.
edit: spelling