Attributes for <MARQUEE ...>
HSPACE = integer
VSPACE = integer
HSPACE
sets the horizontal space to the left and right of the marquee. VSPACE
sets the vertical space at the top and bottom of the marquee.
HSPACE
has no effect unless you also use the
HSPACE
attribute. These three code examples show the default value of
HSPACE
(which is 0) and two larger values:
<MARQUEE WIDTH="25%" BGCOLOR=YELLOW>
Howdy there!<P>
Good to see ya!
</MARQUEE>Hi There!
<MARQUEE HSPACE=10 WIDTH="25%" BGCOLOR=YELLOW>
Howdy there!<P>
Good to see ya!
</MARQUEE>Hi There!
<MARQUEE HSPACE=50 WIDTH="25%" BGCOLOR=YELLOW>
Howdy there!<P>
Good to see ya!
</MARQUEE>Hi There!
which give us these marquees:
Hi There!
Hi There!
Hi There!
VSPACE
sets the space between the marquee and text before and after. These code examples show the default value ofVSPACE
(also 0) and two larger values:
Hello.
<MARQUEE BGCOLOR=YELLOW>
Howdy there!
</MARQUEE>
Hi There!
Hello.
<MARQUEE VSPACE=10 BGCOLOR=YELLOW>
Howdy there!
</MARQUEE>
Hi There!
Hello.
<MARQUEE VSPACE=50 BGCOLOR=YELLOW>
Howdy there!</MARQUEE>
Hi There!
which gives us these marquees:
Hello. Hi There!
Hello. Hi There!
Hello. Hi There!
Attribute for <MARQUEE ...>
BGCOLOR = color expression
BGCOLOR sets the background color of the marquee.
<MARQUEE BGCOLOR=YELLOW>
Howdy there!
</MARQUEE>
gives us this marquee:
|
Attribute for <MARQUEE ...>
LOOP = INFINITE | number of loops
LOOP sets how many times the marquee should loop. The default value (i.e. if you don't put a LOOP attribute at all) isINFINITE , which means that the marquee loops endlessly.
This code creates a marquee that loops twice:
this code | produces this |
<MARQUEE LOOP=2>
Hello
</MARQUEE>
| |
One of the problems with LOOP is that the content disappears after the last loop. To set the marquee so that the content is visible when the looping is done set BEHAVIOR SLIDE :
this code | produces this |
<MARQUEE LOOP=2 BEHAVIOR=SLIDE>
Hello
</MARQUEE>
| |
|
Attribute for <MARQUEE ...>
SCROLLAMOUNT = integer
SCROLLAMOUNT , together with SCROLLDELAY , sets the speed of the scrolling. Marquee moves the content by displaying the content, then delaying for some short period of time, then displaying the content again in a new position. SCROLLAMOUNT sets the size in pixels of each jump. A higher value for SCROLLAMOUNT makes the marquee scroll faster. The default value is 6.
The following examples demonstrate the default value for SCROLLAMOUNT , a value of 20 and 50.
this code | produces this |
<MARQUEE>
| |
<MARQUEE SCROLLAMOUNT=20>
| |
<MARQUEE SCROLLAMOUNT=50>
| |
|
Attribute for <MARQUEE ...>
SCROLLDELAY = integer
SCROLLDELAY , together with SCROLLAMOUNT , sets the speed of the scrolling. Marquee moves the content by displaying the content, then delaying for some short period of time, then displaying the content again in a new position. SCROLLDELAY sets the amount of delay in milliseconds (a millisecond is 1/1000th of a second). The default delay is 85.
The following examples show the default SCROLLDELAY (i.e. when it is not set), a value of 500 (half a second) and 1000 (one full second).
this code | produces this |
<MARQUEE>
| |
<MARQUEE SCROLLDELAY=500>
| |
<MARQUEE SCROLLDELAY=1000>
| |
SCROLLDELAY is good for making the marquee slower then the default but it's not much help in speeding it up. Try SCROLLAMOUNT to speed up the marquee.
|
Attribute for <MARQUEE ...>
BEHAVIOR = SCROLL | SLIDE | ALTERNATE
BEHAVIOR indicates how the contents scroll.
BEHAVIOR=SCROLL , which is the default, indicates that the content should scroll off the edge of the marquee area, then reappear on the other side:
this code | produces this |
<MARQUEE BEHAVIOR=SCROLL>
| |
BEHAVIOR=SLIDE is almost the same, except that it indicates that when the leading part content reaches the left edge it should stop without scrolling off. Notice in this example that the contents stop scrolling as soon as the "H" reaches the left side:
this code | produces this |
<MARQUEE BEHAVIOR=SLIDE>
| |
BEHAVIOR=ALTERNATE makes the content bounce back and forth, all of it remaining visible all the time (assuming of course that it all fits).
this code | produces this |
<MARQUEE BEHAVIOR=ALTERNATE>
| |
|
Attribute for <MARQUEE ...>
DIRECTION = LEFT | RIGHT
DIRECTION indicates which direction the marquee scrolls. DIRECTION=LEFT , which is the default, indicates that the marquee starts at the right and moves leftwards across the page. DIRECTION=RIGHT indicates that the marquee starts at the left and moves rightwards across the page.
this code | produces this |
<MARQUEE DIRECTION=LEFT>
| |
<MARQUEE DIRECTION=RIGHT>
| |
|
Attributes for <MARQUEE ...>
WIDTH = "width expression"
HEIGHT = integer
WIDTH and HEIGHT set the dimensions of the marquee. This code creates a marquee that is 200 wide and 50 tall:
<MARQUEE WIDTH=200 HEIGHT=50>
Howdy!
</MARQUEE>
Neither attribute is required. The default value for WIDTH is 100% . The height defaults to the natural height of content as it appears in the width. So, for example, this markup creates a marquee that is 200 wide and as tall as it needs to be:
<MARQUEE WIDTH=200>
Happy Halloween!<BR>
<IMG SRC="graphics/pumpkin.gif" HEIGHT=100 WIDTH=100 ALT="picture of a pumpkin">
</MARQUEE>
|
Posting Komentar