H
H
hellcaster2018-06-24 21:07:39
HTML
hellcaster, 2018-06-24 21:07:39

svg not connecting properly?

I have a Twitter svg. When I connect through , everything is fine, but when I connect through, I get crooked<img src="" alt=""><svg></svg>

Result
5b2fdcb5a6c76944032125.png
Справа через img, слева через тег svg.

I need to style the image on hover and focus, which is why I chose . What problems can hit?<svg></svg>
HTML code
<ul>
  <li class="socialLink">
    <a href="https://twitter.com" target="_blank">
      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="17" height="15" viewBox="0 0 17 15"><image overflow="visible" width="17" height="15" xlink:href="t.png"/><path fill="#FFF" d="M10.95.144c1.685-.496 2.984.27 3.577 1.179.673-.231 1.331-.481 2.011-.708a2.345 2.345 0 0 1-.857 1.768c.685.17 1.304-.491 1.304-.491-.169 1-1.006 1.788-1.563 2.024-.231 6.75-3.175 11.217-10.077 11.082h-.446c-.41 0-4.164-.46-4.898-1.887 2.271.196 3.893-.422 4.693-1.177-.96-.3-2.679-.477-2.979-2.95.349.106.564.228 1.19.119C1.705 8.247.374 7.53.448 5.33c.285.328 1.067.536 1.34.472C1.085 5.561-.182 2.442.894.85c1.818 1.854 3.735 3.606 7.152 3.773C8.254 2.33 9.183.793 10.95.144z"/></svg>
    </a>
  </li>
  <li class="socialLink">
    <a href="https://www.facebook.com" target="_blank">
      <img src="img/twitter.svg" alt="">
    </a>
  </li>
</ul>

SVG
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="17" height="15" viewBox="0 0 17 15"><image overflow="visible" width="17" height="15" xlink:href="t.png"/><path fill="#FFF" d="M10.95.144c1.685-.496 2.984.27 3.577 1.179.673-.231 1.331-.481 2.011-.708a2.345 2.345 0 0 1-.857 1.768c.685.17 1.304-.491 1.304-.491-.169 1-1.006 1.788-1.563 2.024-.231 6.75-3.175 11.217-10.077 11.082h-.446c-.41 0-4.164-.46-4.898-1.887 2.271.196 3.893-.422 4.693-1.177-.96-.3-2.679-.477-2.979-2.95.349.106.564.228 1.19.119C1.705 8.247.374 7.53.448 5.33c.285.328 1.067.536 1.34.472C1.085 5.561-.182 2.442.894.85c1.818 1.854 3.735 3.606 7.152 3.773C8.254 2.33 9.183.793 10.95.144z"/></svg>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hellcaster, 2018-06-24
@web_Developer_Victor

Solved the problem through opacity to img

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question