+ 8
Can i use <animate> with a <img src> ?
i would like to make a image move in the page
4 Réponses
+ 3
You have to use the <marquee> tag.
+ 16
It would be better if you use css. Marquee is deprecated.
+ 4
@Robyn_A:
Actually <marquee> still works in most of browsers, even in an html5 document...
The trick is that <marquee> had never been part of html specification, and html5 specification discourage it use and implementation, meaning that it should becomes unsupported by mostly browsers in future ^^
@Arthur Abreu:
<animate> is not part of HTML standard, but part of SVG one: it can only be used in <svg> container...
However, <svg> can hold image (as background of SVG shapes, so <img> in html is quite equivalent to <rect> in svg with background-image, even if svg is not design to handle bitmaps at first) and you can use <animate> as child of it.
Anyway, @Swapnil Srivastava is right, using css animation features should be the better way to do ;)
+ 1
@Swapnil Thanks, I forgot that even though <marquee> works in the code playground, it doesn't work in HTML5.