<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 612 224.5" enable-background="new 0 0 612 224.5" xml:space="preserve">
<path fill="none" stroke="#FFFFFF" stroke-miterlimit="10" d="M6.7,57.6c1.8-7.5,9.8-11.4,22.4-12.6l73.1,1.3
c22.8-1.8,42.6-5.1,55.8-11.8c46.1-19.4,95-28.7,146.2-29.4C358.5,4,407.2,15.3,452,35.2c17.1,6.1,35.8,9.8,55.8,11.3l73.9-1.5
c12,1.4,21.6,4.8,24.9,13.6v108c-1.6,7.6-9.7,12.4-25.6,12.1l-73.1,0.3c-19.5,2.3-55.5,11.1-55.5,11.1
c-41.6,18.3-90.1,28.6-146.5,29.9c-64-2.2-108.2-13.9-145.7-30.4c-16.1-5.2-34.7-8.9-56-10.8H30.9C20.7,179.7,11.7,177,5,167.1
L6.7,57.6z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="beaker" viewBox="214.7 0 182.6 792">
<!-- <path>s and whatever other shapes in here -->
</symbol>
<symbol id="shape-icon-2" viewBox="0 26 100 48">
<!-- <path>s and whatever other shapes in here -->
</symbol>
</svg>
<svg class="icon">
<use xlink:href="#shape-icon-1" />
</svg>
<svg class="icon">
<use xlink:href="#shape-icon-2" />
</svg>
fill: black
и т. д.). Замечу, что атрибут viewBox для символов нужно задавать обязательно, что-бы картинки правильно масштабировались (например если вы будете изменять их размеры). <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<view id="rect" viewBox="0 0 100 100"/>
<rect fill="#69c" x="20" y="20" width="60" height="60"/>
<view id="circle" viewBox="100 0 100 100"/>
<circle fill="#f90" cx="150" cy="50" r="30"/>
<view id="polygon" viewBox="200 0 100 100"/>
<polygon fill="#3c6" points="220,80 280,80 250,20 220,80"/>
</svg>
div {
display: inline-block;
width: 100px;
height: 100px;
background-repeat: no-repeat;
background-color: #f0f0f0;
background-position: 50% 50%;
}
.a1 {
background-image: url(image.svg#rect);
}
.a2 {
background-image: url(image.svg#circle);
}
.a3 {
background-image: url(image.svg#polygon);
}
<div class="a1"></div>
<div class="a2"></div>
<div class="a3"></div>
<img class="img" src="image.svg#rect">
<img class="img" src="image.svg#circle">
<img class="img" src="image.svg#polygon">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="0 0 15 169" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="shape">
<polygon points="3,84 7,76 4,84 7,92 "/>
</symbol>
<polygon points="3,84 7,76 4,84 7,92 "/>
<symbol id="shapeRed">
<use xlink:href="#shape" fill="red"/>
</symbol>
<symbol id="shapeGreen">
<use xlink:href="#shape" fill="green"/>
</symbol>
</svg>
.arrow {background:url(icon.svg#shapeGreen);}
.arrow:hover {background:url(icon.svg#shapeRed);}
atb = document.styleSheets[__найти номер стайлшита__].cssRules[__найти номер привила__].style.backgroundImage;
atb = atb.replace('url(,','').replace(/\)$/,'');
atb = window.btoa('<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg viewBox="0 0 15 169" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <use xlink:href='+abt+'/></svg>');
document.styleSheets[__номер стайлшита__].cssRules[__номер привила__].style.backgroundImage = atb;