Scrolling subtitles are commonly known as the Happy Lights, the Web page has a scrolling subtitles is still very bright eye. The first time to create their own scrolling subtitles when the excitement overwhelmed. Do you want to also learn how to make a scrolling caption? blue1000.com teaches you to use Dreamweaver software: The method of making scrolling subtitles.
Scrolling captions are available in the components of FrontPage, but FrontPage can only support a single line of text, there is more than one line of text it can do nothing, and it can only support a line of scrolling! (If there is only one row to scroll, the solution is to embed the code in the JavaScript document.write, see the example below for a detailed description) Dreamweaver can also only use the method of writing HTML code. So it is highly recommended to use Notepad to open the page source code to edit.
1. Create the first scrolling marquee. Code:
The following is a reference fragment: <marquee scrollamount=2 width=300> Scrolling subtitles </marquee> |
2. Detailed Parameters:
a) scrollamount. It represents speed, the greater the value the faster. If you do not have it, the default is 6, it is recommended to set the 1~3 better.
b width and height, indicating the size of the rolling area, width is wide, height is high. Especially when doing vertical scrolling, be sure to set the value of height.
c) direction. Indicates the direction of scrolling, which defaults to Right-to-left: ←←←. The optional values are right, down, up. Scrolling direction is: Right means →→→,up said ↑,down ↓.
D Scrolldelay, which is also used to control speed, the default is 90, the greater 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 with alternate (alternating scrolling), slide (slide effect, refers to scrolling once, and then stop scrolling)
3. Examples:
a How do I add a hyperlink to a scrolling marquee? This is exactly the same as the usual hyperlinks. Just add it outside the text
The following is a reference fragment: <marquee scrollamount=2 width=300><a href=http://www.cctv.com> CCTV </a></marquee> |
Click on CCTV to enter the:
Cctv
b How to make the text stop scrolling when the mouse hovers over the text?
Code such as:
The following is a reference fragment: <marquee scrollamount=2 width=300 onmouseover=stop () Onmouseout=start () > Text content </marquee> |
c) Alternating effects. Code such as:
The following is a reference fragment: <marquee scrollamount=2 width=99 behavior=alternate> text content </marquee> |
Multiple lines of text scroll up. Code such as:
The following is a reference fragment: <marquee scrollamount=2 width=300 height=160 direction=up> Good morning! <br> The air is good and fresh ah <br> What is the right food today? <p> <a href=http://www.cctv.com> CCTV </a></marquee> |
• Note: If your page has been edited by FrontPage and saved and can only scroll one line, you find that your original code sequence has changed, my god! solution is to find the original code, Embed it in the document.write of JavaScript, the code above reads:
The following is a reference fragment: <marquee scrollamount=2 width=300 height=160 direction=up> Good morning! <br> The air is good and fresh ah <br> What is the right food today? <p> <a href=http://www.cctv.com> CCTV </a></marquee> |
From the above can be seen, HTML code can be arbitrarily combined, the function is still very powerful drop!