U
U
user 81282015-07-14 21:54:09
Animation
user 8128, 2015-07-14 21:54:09

How to animate img to svg?

Please tell me why the img element in svg is not animated.

<svg xmlns="http://www.w3.org/2000/svg"
        xmlns:xlink="http://www.w3.org/1999/xlink"
  viewBox="0 0 720 1280">
  <img 
    x="614" 
    y="680" 
    width="55" 
    height="55" 
    src="http://cdn.embed.ly/providers/logos/jsfiddle.png">
    <animate 
      attributeName="cy" 
      attributeType="XML" 
      from="680" 
      to="404" 
      fill="remove" 
      begin="0s" 
      dur="5s" 
      repeatCount="indefinite">
    </animate>
  </img>
</svg>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur, 2015-07-14
@ErvinM

jsfiddle.net/timych/e6zmag06
Read the documentation and don't confuse HTML tags with SVG tags :)
https://developer.mozilla.org/en/docs/Web/SVG/Elem...
https://developer.mozilla.org /en-US/docs/Web/SVG/T...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question