Scrolling Images

This page contains copy/paste codes for scrolling images.

The scrolling images were acheived using the HTML <marquee> tag. Using this tag, you can give your images a horizontal scroll (from right to left, left to right) or a vertical scroll (top to bottom, or bottom to top).

Note that, although the <marquee> tag isn't an offical HTML tag, it is recognized by most of today's browsers. If you can't view the examples, it's likely that your browser doesn't support the <marquee> tag.

Right to Left (RTL)

This section contains an image that scrolls horizontally (right to left, left to right, or a combination). The horizontal scroll is acheived using the direction attribute, which moves the image from right to left or left to right as required.

Slide-In Images

This image slides in from the right then stops. You will need to refresh this page to see the effect again.

Example:

CodeResult

Flying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying BatFlying Bat

Continuous Image Scroll (RTL)

To make the image scroll continuously, we simply change the value of the behavior attribute to scroll (i.e. behavior="scroll").

Example:

CodeResult

Flying Bat

Faster Scrolling

This example uses scrollamount="30" to increase the scroll speed.

Faster scrolling works better on continuous scrolling as opposed to slide-in images. This is because slide-in images stop after sliding in. If it slides in too fast, many users might miss the slide-in effect altogether.

Example:

CodeResult

Flying Bat

Left to Right (LTR)

Slide-In Image

This image slides in from the left, then stays where it is. You will need to refresh this page to see the effect again.

Example:

CodeResult

Flying Bee

Continuous Image Scroll (LTR)

Again, we change the behavior attribute to scroll in order to make the image scroll continuously.

Example:

CodeResult

Flying Bee

Faster Scrolling

This example uses scrollamount="30" to increase the scroll speed.

Example:

CodeResult

Flying Bee

Image bouncing back and forth:

Normal Speed

This image bounces at the default speed.

Example:

CodeResult

Bouncing ball

Faster Bounce

This example uses scrollamount="30" to speed up the scrolling/bouncing image.

Example:

CodeResult

Bouncing ball

Image Scrolling Up:

This image has a vertical scroll - it starts at the bottom and moves up. As with some of the previous examples, you can adjust the scroll speed by using the scrollamount attribute. You could also create a vertical slide by using behavior="slide".

Example:

CodeResult

Flying Bee

Images Scrolling Down:

This image also has a vertical scroll, but this time it starts at the top and moves down.

Example:

CodeResult

Flying Bee

Various Scrolling Speeds:

This example demonstrates 3 different scrolling speeds.

Example:

CodeResult

Flying Bee Fish swimming from right to left Bat flying really fast

Jumping Images

The following example uses the scrolldelay attribute to slow the scrolling image down and make it look like it's jumping across the screen. Actually, the example also uses the scrollamount attribute to increase the size of each jump.

Example:

CodeResult

Cup of tea anyone?

Marquee Attributes

The <marquee> tag accepts a number of attributes (some of which are included in the above examples). Feel free to experiment with these settings to see the effect they have on your scrolling images. The full list of attributes are:

widthSets the width of the marqueescrollamountHow far to jump as it moves
heightSets the height of the marqueeloopHow many times it should loop
directionSets the direction of the marqueebgcolorSets the background color of the marquee
behaviorWhether to slide, bounce, or scrollhspaceSets the amount of horizontal space around the marquee
scrolldelayHow long the marquee should wait before each jumpvspaceSets the amount of vertical space around the marquee

Falling Images

You can get some cool effects from your scrolling images. Check out this falling image (generated with the Falling Object Generator).

...cool!Marquees......effects...

More Scrolling Image/Marquee Codes

Here are more resources for scrolling images and text:

CSS Marquees

The above examples use the HTML marquee tag to create the scrolling effect. CSS 3 - the latest version of Cascading Style Sheets - allows you to create scrolling images using CSS. Although at the time of writing, browser support for CSS marquees was limited, the following pages show how HTML marquees will be handled in the future:

Enjoy this page?

  1. Link to this page (copy/paste into your own website or blog):
  2. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!

Sponsored Link: Design CODE-FREE Websites

Check a Domain:

ZappyHost Logo
Webydo Banner Ad
Webydo Banner Ad