Marquee Behavior to move text in different styles |
Behavior: Specifies how the marquee text should move. Possible values for this attribute are SCROLL or SLIDE or ALTERNATE
We will discuss all these with some examples on how to manage these values.
Scroll: This is the default behavior. This lets the Text to scroll across the screen like a stock ticker i.e., the text should start from only one side and it should scroll completely to the opposite end and start again
Example:
Code:
<marquee bgcolor="#000080" style="color: #FFFFFF; font-family: Book Antiqua" behavior="scroll" > This is an Example Marquee (Behavior : Scroll)</marquee>
Slide: This lets the text move from one end to the other end and once the text reaches the other end it stops scrolling
Example: ( Only in IE)
Code:
<marquee bgcolor="#000080" style="color: #FFFFFF; font-family: Book Antiqua" behavior="slide">This is an Example Marquee (Behavior : Slide)</marquee>
Alternate: This lets the Marquee text to alternate between scrolling and sliding i.e., Starts from one end and on reaching opposite end it moves in the opposite direction
Code:
<marquee bgcolor="#000080" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" > This is an Example Marquee (Behavior : Alternate)</marquee>
HTML Marquee tag for scrolling text
| Marquee Behavior
| Marquee Direction
| Marquee Repeat
| Marquee Speed
|