Rolling subtitles will make many people excited, especially when they use rolling subtitles for the first time. Now make a detailed plan to give you a more comprehensive understanding.
Rolling subtitles are available in FrontPage components, but FrontPage software can only support
Holding a single line of text, it can't do anything when multiple lines of text appear, and it can only support one line of scrolling! (If you can only scroll one line, the solution is to embed this code into JavaScript document.write, please see Detailed description of the following example) Dreamweaver can only use the method of writing HTML code. Therefore, it is strongly recommended to use Notepad to open the source code of the web page for editing.
1. Create the first rolling subtitle. Code:
?? The following is a reference fragment:
<marquee scrollAmount=2 width=300>Scrolling subtitles</marquee>
2. Detailed explanation of each parameter:
??a)scrollAmount. It represents speed, the larger the value, the faster the speed. If it is not available, the default is 6. It is recommended to set it to 1 to 3.
??b) width and height, represent the size of the scrolling area, width is the width, and height is the height. Especially when doing vertical scrolling, the height value must be set.
??c)direction. Indicates the direction of scrolling, the default is from right to left: ←←←. Optional values are right, down, and up. The scrolling directions are: right means →→→, up means ↑, and down means ↓.
??d) scrollDelay, which is also used to control the speed. The default is 90. The larger the value, the slower the speed. Usually scrollDelay does not need to be set.
??e)behavior. Use it to control attributes. The default is circular scrolling. Optional values are alternate (alternating scrolling) and slide (slide effect, which refers to scrolling once and then stopping scrolling)
3. Example:
??a) How to give rolling subtitles Add a hyperlink? This is exactly the same as a normal hyperlink.
Just addthe following quote fragment
outside the text
:<marquee scrollAmount=2 width=300><a href=http://soft.knowsky.com>Software Download</a></marquee>
Click on the software download to enter: Software download
??b) How to make the text stop scrolling when the mouse stays on it?
??The code is as follows:
The following is a quoted 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) Multi-line text scrolls up. Code such as:
The following is a quotation fragment:
<marquee scrollAmount=2 width=300 height=160 direction=up>·Good morning! <br>·The air is so fresh<br>·What are you eating today? <p>·<a href=http://www.cctv.com>CCTV</a></marquee>
??·Note: If your webpage has been edited by FrontPage and after saving, you can only scroll one line. At this time, you find that the order of your original code has changed. My god! The solution is to find the original code and change it. It can be embedded into JavaScript's document.write. The above code is written as:
The following is a quoted fragment:
<marquee scrollAmount=2 width=300 height=160 direction=up>·Good morning! <br>·The air is so fresh<br>·What are you eating today? <p>·<a href=http://www.cctv.com>CCTV</a></marquee>
As can be seen from the above, HTML codes can be combined at will and are powerful!