Moving text (Marquee)
Author:Eve Cole
Update Time:2009-06-20 17:01:14
Marquee markup is used to scroll text within the available browsing area. This tag only applies to IE3 and later versions of the browser.
Format:
<MARQUEE ALIGN="…"
BEHAVIOR="…"
BGCOLOR="…"
DIRECTION="…"
HEIGHT="…"
WIDTH="…"
HSPACE="…"
VSPACE="…"
LOOP="…"
SCROLLAMOUNT="…"
SCROLLDELAY="…"
>…
</MARQUEE>
property:
ALIGN: Used to align scrolling text according to the set value. The values that can be set for ALIGN are: LEFT, CENTER, RIGHT, TOP, BOTTOM. This property is not required.
example:
<MARQUEE ALIGN="TOP">This scrolling text is set to top alignment</MARQUEE>
Effect:
This scrolling text is set to top alignment
BEHAVIOR: You can let the browser process the text according to the set method once it appears on the page. If the method is set to SLIDE, the text moves onto the document and stays in the margins. If set to ALTERNATE, the text moves from side to side. If set to SCROLL, the text will scroll repeatedly on the page. This attribute is not required. The values that can be set are: SILIDE, ALTERNATE, SCROLL.
example:
<MARQUEE BEHAVIOR="ALTERNATE">Text moves from side to side</MARQUEE>
Effect:
Text moves from side to side
BGCOLOR: used to set the background color of subtitles. The background color can be set in RGB, hexadecimal value format or color name.
example:
<MARQUEE BGCOLOR="RED">Set the scrolling text background color to red using a color name</MARQUEE>
<MARQUEE BGCOLOR="#FF0000">Set the background color of the scrolling text to red using a hexadecimal value</MARQUEE>
<MARQUEE BGCOLOR=RGB(100%,0%,0%)>Use RGB to set the background color of the scrolling text to red</MARQUEE>
Effect:
Use color name to set scroll text background color to red
DIRECTION: Used to set the direction of text scrolling. The values that can be set are: LEFT, RIGHT. This property is not required.
example:
<MARQUEE DIRECTION="LEFT">Text scrolls to the left</MARQUEE>
<MARQUEE DIRECTION="RIGHT">Text scrolls to the right</MARQUEE>
Effect:
Text scrolls to the left
Text scrolls to the right
HEIGHT: Used to set the height of rolling subtitles. The height can be expressed in pixels or as a percentage of the visible page. This property is not required.
example:
<MARQUEE HEIGHT="10%">The height of the rolling subtitles is 10% of the visible page</MARQUEE>
<MARQUEE HEIGHT="12">The height of the rolling subtitles is 12 pixels</MARQUEE>
Effect:
The height of the scrolling subtitles is 12 pixels
WIDTH: Used to set the width of the subtitles. The width can be expressed in pixels or as a percentage of the visible page. This property is not required.
example:
<MARQUEE WIDTH="90%">The width of the rolling subtitles is 90% of the visible page</MARQUEE>
<MARQUEE WIDTH="200">The width of the rolling subtitles is 200 pixels</MARQUEE>
Effect:
The width of the scrolling subtitles is 90% of the visible page
The width of the scrolling subtitles is 200 pixels
HSPACE: used to set the blank space left and right of the rolling subtitles. The blank space is expressed in pixels. This property is not required.
example:
<MARQUEE HSPACE="15">The left and right blank spaces of rolling subtitles are 15 pixels</MARQUEE>
Effect:
The left and right white space of scrolling subtitles is 15 pixels
VSPACE: used to set the blank space above and below the rolling subtitles. The blank space is represented by pixels. This property is not required.
example:
<MARQUEE VSPACE="2">The blank space above and below the scrolling subtitles is 2 pixels</MARQUEE>
Effect:
The white space above and below the scrolling subtitle is 2 pixels
LOOP: used to set the number of scrolling times for rolling subtitles. When the value of LOOP is "INFINITE" or "-1", the text will scroll indefinitely. This property is not required.
example:
<MARQUEE LOOP="-1">Text scrolls countless times</MARQUEE>
<MARQUEE LOOP="5">Text scrolls 5 times</MARQUEE>
Effect:
Text scrolls countless times
SCROLLAMOUNT: used to set the interval after each continuous scrolling text, the interval is expressed in pixels. This property is not required.
example:
<MARQUEE SCROLLAMOUNT="10">This text will be followed by 10 pixels</MARQUEE>
Effect:
The space behind this text is 10 pixels
SCROLLDELAY: used to set the interval between two scroll operations, the time is in milliseconds. This property is not required.
example:
<MARQUEE SCROLLDELAY="5">The time between scrolling of this text is 5 milliseconds</MARQUEE>
Effect:
The time between scrolling of this text is 5 milliseconds