I started looking in the direction of svg, I create my own sprite using symbol, but I cannot display a symbol in the Use tag, help me figure out what the reason is. svg itself is in a separate file, connect in this way:

<svg class="unit"> <use xlink:href="iconsSvg.svg#gear"></use> </svg> 

actually a piece of svg that I connect:

 <symbol id="gear" viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve"> <path fill="#000000" stroke="#000000" d="M 122.6 16.8C 119.9 26 117.4 34.2 116.9 35.1C 116.5 35.9 114.2 37.2 111.8 37.9C 109.4 38.6 104.2 40.7 100.1 42.6L 92.8 46L 76 37C 66.8 32 58.9 28 58.4 28C 57.3 28 28 57.2 28 58.3C 28 58.8 32 66.6 37 75.7C 44.9 90.2 45.8 92.5 44.8 94.4C 44.1 95.5 41.8 101 39.5 106.4L 35.4 116.4L 27.4 118.8C 23.1 120.1 15.1 122.5 9.8 124.1L 9.53674e-07 127.1L 9.53674e-07 149.3L 9.53674e-07 171.6L 16.8 176.5C 26 179.1 34 181.8 34.6 182.4C 35.3 183 36.6 186 37.5 189C 38.5 192 40.6 197.4 42.1 200.9L 45 207.3L 36 224C 31.1 233.2 27 241.1 27 241.6C 27 242.1 33.7 249.2 41.9 257.4C 51.9 267.3 57.3 272.1 58.3 271.7C 59.1 271.4 66.9 267.3 75.5 262.6L 91.3 254L 98.4 257.4C 102.3 259.3 108 261.5 111.1 262.5L 116.7 264.3L 121 278.9C 123.4 286.9 125.7 295 126.2 296.7L 127.1 300L 149.4 300L 171.8 300L 173.8 293.2C 175 289.5 177.3 281.5 179.1 275.4L 182.3 264.3L 187.9 262.5C 190.9 261.6 196.7 259.3 200.7 257.5L 208 254.1L 224.4 263.1C 233.4 268 241.2 272 241.7 272C 242.9 272 272 242.7 272 241.4C 272 240.8 268 232.9 263 223.8L 254.1 207.3L 258.1 198C 260.3 192.9 262.4 187.4 262.7 185.8C 263 184.3 263.8 182.6 264.4 182.3C 265 181.9 273.1 179.3 282.5 176.5L 299.5 171.3L 299.8 149.3L 300 127.3L 281.8 121.9L 263.6 116.4L 260.5 108.4C 258.8 104.1 256.4 98.7 255.2 96.4L 253.1 92.3L 261.2 77.4C 265.6 69.2 269.7 61.5 270.3 60.2C 271.3 58.1 270.2 56.7 256.4 42.9C 248.2 34.7 241.1 28 240.6 28C 240.1 28 232.1 32.1 222.9 37.1L 206.1 46.1L 201.8 43.9C 199.4 42.7 194.1 40.5 190 39L 182.5 36.2L 177 18.1L 171.5 0L 149.5 0L 127.5 0L 122.6 16.8zM 165.8 77.6C 207.6 86.1 234.2 128.2 223.5 168.5C 216.7 193.7 195.7 214.6 170 221.6C 160.4 224.3 143 224.1 132.3 221.2C 111.6 215.6 92.5 198.5 83.9 178C 70.3 145.4 81.5 109.6 112 88.3C 115.6 85.8 119.8 83.3 121.5 82.7C 123.1 82.2 125.1 81.3 125.8 80.7C 127.8 79.1 144 76.2 151.3 76.1C 155 76 161.6 76.7 165.8 77.6z"/ </symbol> 

Damn himself, by stupidity, missed the closing tag, damn half a day killed.

Closed due to the fact that off-topic participants Crantisz , aleksandr barakin , Timofei Bondarev , αλεχολυτ , Qwertiy 6 May '17 at 14:53 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Crantisz, aleksandr barakin, Timofei Bondarev, αλεχολυτ, Qwertiy
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • It happens. Come again with new questions. :) - Nick Volynkin

0