Marquee for HTML code

Source: Internet
Author: User
This label is not part of html3.2 and only supports the kernel after msie3. Therefore, if you use a non-ie kernel browser (such as Netscape), you may not be able to see the following interesting results:
This label is a container label.
Syntax:

<Marquee> </marquee> The following is a simple example: Code <Marquee> <font size = + 3 color = Red> Hello, world </font> </marquee> the following events are frequently used:
Onmouseout = "This. Start ()": used to set the scroll continued when the mouse moves out of the area.
Onmouseover = "this. stop () ": the code used to stop the scroll when the mouse moves into the area is as follows: <marquee onmouseout =" this. start () "onmouseover =" this. stop () "> onmouseout =" this. start () ": used to set the rolling onmouseover =" this. stop () ": used to set the scroll to stop when the mouse moves into this area </marquee> This is a complete example: the code is as follows: <marquee id = "affiche" align = "Left" behavior = "scroll" bgcolor = "# ff0000" direction = "up" Height = "300" width = "200" hspace = "& quot; 50 & quot; vspace = & quot; 20 & quot; loop = & quot;-1 & quot; scrollamount = & quot; 10 & quot; scrolldelay = & quot; 100 & quot; onmouseout = & quot; this. start () "onmouseover =" this. stop () ">
This is a complete example.
</Marquee> the tag supports up to 11 attributes: Align
Set the alignment of <marquee> tag content
Absbottom: absolute bottom alignment (alignment to the bottom of letters such as G and P)
Absmiddle: absolute central alignment
Baseline: Bottom Line alignment
Bottom: Bottom alignment (default)
Left: Left alignment
Middle: center alignment
Right: Right
Texttop: Top Line alignment
Top: The top alignment code is as follows: <marquee align = "absbottom"> align = "absbottom": absolute bottom alignment (aligned with the bottom of letters such as G and P ). </Marquee>
<Marquee align = "absmiddle"> align = "absmiddle": absolute central alignment. </Marquee>
<Marquee align = "baseline"> align = "baseline": Bottom Line alignment. </Marquee>
<Marquee align = "bottom"> align = "bottom": Bottom alignment (default ). </Marquee>
<Marquee align = "Left"> align = "Left": Left-aligned. </Marquee>
<Marquee align = "Middle"> align = "Middle": center alignment. </Marquee>
<Marquee align = "right"> align = "right": Right-aligned. </Marquee>
<Marquee align = "texttop"> align = "texttop": Top Line alignment. </Marquee>
<Marquee align = "TOP"> align = "TOP": Align the top. </Marquee> Behavior
Set the scroll mode:
Alternate: Indicates rolling back and forth between the two ends.
Scroll: indicates that the scroll from one end to the other will be repeated.
Slide: Scroll from one end to the other end without repeating. The Code is as follows: <marquee behavior = "alternate"> Alternate: Indicates rolling back and forth between the two ends. </Marquee>
<Marquee behavior = "scroll"> scroll: indicates that the scroll from one end to the other end is repeated. </Marquee>
<Marquee behavior = "slide"> slide: Scroll from one end to the other without repeating. </Marquee> bgcolor
Set the background color of an active subtitle. The background color can be set in RGB, hexadecimal format, or color name. The Code is as follows: <marquee bgcolor = "#006699"> set the background color bgcolor = "#006699" </marquee>
<Marquee bgcolor = "RGB (10%, 50%, 100%,)"> set the background color bgcolor = "RGB (10%, 50%, 100%,)" </marquee>
<Marquee bgcolor = "red"> set the background color bgcolor = "red" </marquee> direction
The code for setting the scroll direction of an active subtitle is as follows: <marquee direction = "down"> set the scroll direction of the active subtitle direction = "down": Down </marquee>
<Marquee direction = "Left"> set the scroll direction of the subtitles. Direction = "Left": Left </marquee>
<Marquee direction = "right"> set the rolling direction of the subtitles. Direction = "right": Right </marquee>
<Marquee direction = "up"> set the scroll direction of the subtitles. Direction = "up": Up </marquee> height
The code for setting the height of an active subtitle is as follows:
<Marquee Height = "500" direction = "down" bgcolor = "# cccccc"> set the height of an active subtitle = "500" </marquee> width
The code for setting the width of an active subtitle is as follows:
<Marquee width = "500" bgcolor = "# cccccc"> set the width of an active subtitle = "500" </marquee> hspace
Set the distance from the position of the subtitle to the horizontal border of the parent container
This controls the horizontal (horizontal) space around the display box. the Code is as follows: <Table width = "500" border = "1" align = "center" cellpadding = "0" cellspacing = "0">
<Tr>
<TD> <marquee hspace = "100" bgcolor = "# cccccc"> hspace = "100" </marquee> </TD>
</Tr>
</Table> vspace
Set the distance from the position of the subtitle to the vertical border of the parent container.
This controls the vertical (vertical) space around the display box. The Code is as follows:
<Marquee vspace = "100" bgcolor = "# cccccc"> hspace = "100" </marquee> Loop
Set the number of scrolling times. When loop =-1 indicates that the scrolling continues. The default value is-1. The Code is as follows: <marquee loop = "-1" bgcolor = "# cccccc"> I will keep walking. </Marquee>
<P> </P>
<Marquee loop = "2" bgcolor = "# cccccc"> I only walked twice </marquee> scrollamount
Set the rolling speed of subtitle activity. The pixels code is as follows: <marquee scrollamount = "10"> scrollamount = "10" </marquee>
<Marquee scrollamount = "20"> scrollamount = "20" </marquee>
<Marquee scrollamount = "30"> scrollamount = "30" </marquee> scrolldelay
Sets the delay time between two active subtitle scrolling times. Unit: Millisecond (MS)
If the value is too large, the code will pause one step at a time: <marquee scrolldelay = "10"> scrolldelay = "10" </marquee>
<Marquee scrolldelay = "100"> scrolldelay = "100" </marquee>
<Marquee scrolldelay = "1000"> scrolldelay = "1000" </marquee>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.