Marquee in html

Source: Internet
Author: User

This label is not part of HTML3.2 and only supports the kernel after MSIE3, So if you use a non-IE kernel browser (such as Netscape) you may not be able to see the following interesting results. The label is a container tag Syntax: <marquee> </marquee> The following is a simple example: the code is as follows: <marquee> <font size = + 3 color = red> Hello, World </font> </marquee> the following two events are frequently used: onMouseOut = "this. start () ": used to set the rolling 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 onMous when the mouse moves out of the area EOver = "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 sets the align alsbottom: absolute bottom alignment (alignment to the bottom of letters such as g and p) absmiddle: absolute center Alignment baseline: bottom Line alignment bottom: bottom alignment (default) left: left alignment middle: center alignment right: right alignment texttop: top 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 sets the scroll mode: alternate: to scroll 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 is repeated. </Marquee> <marquee behavior = "slide"> slide: Scroll from one end to the other end without repeating. </Marquee> bgcolor specifies the background color of an active subtitle. The background color can be set using the format or color name of RGB or hexadecimal values. 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 "> the following code sets the background color bgcolor =" red "</marquee> direction to set the scroll direction of an active Subtitle: <marquee direction = "down"> set the rolling direction of the subtitles. direction = "down ": downward </marquee> <marquee direction = "left"> sets the scroll direction of the subtitles. direction = "left": left </marquee> <marquee direction = "right"> Set the rolling direction of the subtitle activity. direction = "right": right </marquee> <marquee direction = "up"> set the rolling direction of the subtitle activity. direction = "up ": the code for setting the height of an active subtitle up </marquee> height is as follows: <marquee height = "500" direction = "down" bgcolor = "# CCCCCC"> code used to set the height of an active subtitle = "500" </marquee> width to set the width of an active subtitle as follows: <marquee width = "500" bgcolor = "# CCCCCC"> set the width of an active subtitle = "500" </marquee> the distance from the parent container to the position of the active subtitle. border distance This controls the horizontal (horizontal) space around the display box. the Code is as follows: <t Able width = "500" border = "1" align = "center" cellpadding = "0" cellspacing = "0"> <tr> <td> <marquee hspace = "100" bgcolor = "# CCCCCC"> hspace = "100" </marquee> </td> </tr> </table> vspace sets the vertical distance from the parent container to the position of the subtitle. border distance This controls the vertical (vertical) space around the display box. the Code is as follows: <marquee vspace = "100" bgcolor = "# CCCCCC"> hspace = "100" </marquee> loop sets 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 not Stop. </Marquee> <p> & nbsp; </p> <marquee loop = "2" bgcolor = "# CCCCCC"> I only go twice </marquee> scrollamountwww.2cto.com to set the rolling speed of subtitles, the Unit 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 latency between two active subtitle scrolling times, the Unit is millisecond (millisecond). The Code for one stop is as follows: <marquee lead = "10"> scrolldelay = "10" </marquee> <marquee scrolldelay = "100"> scrolldelay = "100" </marquee> <marquee scrolldelay =" "> scrolldelay =" 1000 "</marquee>

Related Article

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.