1
I am using svg Sprite and would like to know how to style these icons, I can use the fill: color
, but I’d like to give a Hover effect by just leaving the edge.
I’ll put the codes I have here to make the icon appear.
SVG:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="facebook" viewBox="0 0 233.1 233.1">
<path class="st0" d="M116.5,0C52.2,0,0,52.2,0,116.5c0,64.4,52.2,116.5,116.5,116.5c64.4,0,116.5-52.2,116.5-116.5C233.1,52.2,180.9,0,116.5,0C116.5,0,116.5,0,116.5,0z M145.7,80.2h-15c-4,0-6.9,3.4-6.9,7.7v6.7h21.4l-3.5,21.7h-18v58.2h-21.9v-58.2H87.3V94.6h14.6V83.5l0,0c0.4-12.6,4.8-24.7,26.2-25.4V58h17.7L145.7,80.2L145.7,80.2z"/>
</symbol>
</defs>
</svg>
CSS:
.social-buttons svg use
{
fill: #fff;
}
HTML:
<a href="#">
<svg class="icon-facebook">
<use xlink:href="svg/myicons.svg#facebook"></use>
</svg>
</a>
To better understand, I have a file myicons.svg
summarized it to only one of the icons, ai in html I call icone by class
and in css I give style to this icone.
I would like to know if I can leave this icon only with an unfilled edge when using :Hover.
DO NOT use Code snippet (Stack Snippets) like this, read: http://meta.pt.stackoverflow.com/q/2115/3635
– Guilherme Nascimento
@Guilhermenascimento OK Thank you.
– user27585