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