marquee| various text scrolling codes (for announcements)

Source: Internet
Author: User

marquee| various text scrolling codes (for Announcements) 1. Create the first scrolling caption. Code:
<marquee scrollamount=2 width=300> My Clock web tree tree </marquee>
Effects such as: I clock the Web tree

2. Detailed Parameters:
A)scrollamount. It represents speed, and the greater the value, the faster. If it is not, the default is 6, which is better.
b) Width and height, which indicates the size of the scrolling area, width is wide, height is high. Especially when doing vertical scrolling, be sure to set the height value.
c)direction. Represents the direction of scrolling, which defaults to right-to-left: ←←←. The optional values are right, down, up. The scrolling direction is: Right means →→→,up represents ↑,down ↓.
d) Scrolldelay, which is also used to control the speed, the default is 90, the higher the value, the slower the speed. Usually the scrolldelay is not required to be set.
e) behavior. Use it to control properties, default to circular scrolling, optional values are alternate (alternating scrolling), slide (slide effect, refers to scrolling once, and then stops scrolling)

3. Example:
A) how to add hyperlinks to scrolling captions ? This is exactly the same as the usual hyperlinks. Just add <a href=***> and </a> on the outside of the text. The following effect, the code is <marquee scrollamount=2 width=300><a href=http://www.cctv.com> CCTV </a></marquee> , click on CCTV to enter:
Cctv

b) How to make the text stop scrolling when the mouse rests on the text?
Code such as:
<marquee scrollamount=2 width=300 onmouseover=stop () Onmouseout=start () > Text content </marquee>
Effects such as:
Text content

c) alternating effect. Code such as:
<marquee scrollamount=2 width=99 behavior=alternate> Text content </marquee>
Effects such as:
Text content

D) Multiple lines of text scroll up. Code such as:
<marquee scrollamount=2 width=300 height=160 direction=up> Good morning! <br> Air is good and fresh ah <br> today food what good? <p> <a href=http://www.cctv.com> CCTV </a></marquee>
Effects such as:
• Good morning!
• The air is so fresh.
• What's good about food today?

· CCTV

· 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> Air is good and fresh ah <br> today food what good? <p> <a href=http://www.cctv.com> CCTV </a></marquee> ') </script>

e) Change the color of the scrolling subtitles? You can use style sheets to control. The following effect, the code is <marquee scrollamount=2 width=300><a style=color:cc6600> My clock to the tree tree! </a></marquee>.
I mean the Web tree!

marquee| various text scrolling codes (for announcements)

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.