Scrolling subtitles can make a lot of people feel excited, especially when scrolling subtitles are used for the first time. Now do a detailed plan to give you a more comprehensive understanding.
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 scrolling 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, defaults to 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 when the mouse hovers over the text, the text stops scrolling?
code such as:
The following is a reference fragment: <marquee scrollamount=2 width=300 onmouseover=stop () Onmouseout=start () > Text content </marquee> |
C) alternating effect. Code such as:
The following is a reference fragment: <marquee scrollamount=2 width=99 behavior=alternate> text content </marquee> |
D) 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, you can only scroll one line after you save it, 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> |
As can be seen from the above, HTML code can be arbitrary combination of powerful features!
Note : For more wonderful tutorials, please pay attention to the triple web Design Tutorial section,