- HTML Scrolling Image — using the HTML
- CSS Scrolling Image — using the CSS animations (recommended)
The HTML method involves placing your
<img> element inside a
See HTML Scrolling Image for more examples.
Below is the same effect, but this time it is done using CSS animations. This is the recommended method, as CSS animations are being added to the W3C CSS specifications.
In this case, we use the CSS
animation property in conjunction with the
@keyframes rule to determine how the image should move. We use
translateX() to specify the starting point and end point of the scrolling image.
See CSS Scrolling Image for more examples.
More Marquee Codes
You can do much more with HTML marquees than is covered on this page. Here's the full list of marquee codes on this website:
Also check out the Marquee Generator.
Try to be careful when using HTML marquees. Many web users dislike websites that contain scrolling or bouncing images and other elements, so try to use them tastefully :)