Scrolling Image

There are two easy ways to add a scrolling image to a web page (without using JavaScript). These are:

HTML Scrolling Image

The HTML method involves placing your <img> element inside a <marquee> element.

See HTML Scrolling Image for more examples.

Source CodeResult
Swimming fish

CSS Scrolling Image

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.

Source CodeResult
Swimming fish

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:

Marquee Generator

Also check out the Marquee Generator.

Marquee Usability

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 :)

About HTML.support

HTML.support was created in order to provide HTML tools, codes, tutorials, and other resources to help webmasters create and maintain their HTML documents.

HTML.support aims primarily at beginners, but may also be useful to web professionals.

About the HTML Codes

The HTML codes on this website are provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

Need Hosting?

Our partner site HOSTEK provides website hosting, domain names and related products at some of the best prices on the web. If you need web hosting, check them out!