HTML tag Marquee for scrolling effect

Source: Internet
Author: User

HTML tags- <marquee></marquee> can achieve a variety of scrolling effects, without JS control. Use the marquee tag not only to move text, but also to move pictures, tables, and so on. Just enter the content you want to scroll inside <marquee></marquee>.

First, label properties

1. Scrolling direction Direction(including 4 values: Up, down, left, and right)

Syntax: <marquee direction= "scrolling direction" >...</marquee>

2. Scrolling mode behavior(scroll: cyclic scrolling, default effect; slide: stop only once scrolling; alternate: rotate back and forth)

Syntax: <marquee behavior= "scrolling mode" >...</marquee>

3. Scrolling speed scrollamount(scrolling speed is the length, in pixels, that is set to move at each scroll, and if it is not, the default is 6, which is better. )

Syntax: <marquee scrollamount= "5" >...</marquee>

4. Rolling delay Scrolldelay(sets the time interval for scrolling, in milliseconds, usually scrolldelay is not required.) )

Syntax: <marquee scrolldelay= ">...</marquee>"

5. Scroll loopsLoop (default is-1, scrolling will continue to loop)

Syntax: <marquee loop= "2" >...</marquee>

6. Scroll range width, height

7. Scrolling background color bgcolor

8. Blank Space Hspace, vspace

II. Events

1.onmouseout () = "This.start ()": Used to set the mouse to move out to change the area when scrolling continues

2.onmouseover () = "This.stop ()": To stop scrolling when the mouse is moved into the area

Third, examples

1. Add hyperlinks to scrolling captions

<scrollamountwidth=300><href  =http://www.cctv.com> CCTV </a></  Marquee>

2. Mouse over text, text stop scrolling

<scrollamount   width onmouseover  onmouseout=start ()> text content </marquee>

3. Multi-line text scrolling up

<MarqueeScrollAmount=2width=300Height=160direction=up>• Good morning!<BR>• The air is so fresh.<BR>• What's good about food today?<P>·<ahref=http://www.cctv.com>Cctv</a></Marquee>    

Note : If your page has been edited in FrontPage, you can only scroll one line after you save it, and then you find that your original code order has changed, My god! The solution is to find the original code, embed it in JavaScript 's document.write, and write this code as:

< Script >     document.write ('        <marquee scrollamount=2 width=300 height=160 direction=up>        • Good morning! <br>        • The air is good and fresh <br> what is the        best food? <p>        <a href=http://www.cctv.com> CCTV </a></marquee>    ')  </script>                    

/* Reference:

*1.http://www.cnblogs.com/mountain-mist/articles/975781.html

*2.http://www.cnblogs.com/zzuivy/p/marqueetest_1.html

*/

HTML tag Marquee for scrolling effect

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.