Home >Web Front-end >HTML Tutorial >Detailed explanation of HTML rolling subtitle code and parameters_html/css_WEB-ITnose
html text scrolling code
<marquee style="WIDTH: 388px; HEIGHT: 200px" scrollamount="2" direction="up" ><div align="left" ><br /></div ><center ><font face="黑体" color="#008000" size="4" ></font ></center ><div align="left" ><br /></div ><center ><p ><font color="#ff6600" size="4" >滚动文字</font ></p ><p ><font color="#ff4500" size="4" >滚动文字</font ></p ><p ><font color="#ff3300" size="4" >滚动文字</font ><br /><br /></p ></marquee >
marquee parameter:
BGColor : The background color of the scrolling text box.
Direction: Scroll direction setting, you can choose Left, Right, up and down.
scrolldelay: The delay time between each round of scrolling, the larger the time, the slower it will be.
scrollamount: The total amount of time for a scroll. The smaller the number, the slower the scrolling.
Behaviour: Setting the scrolling method, three values: Scroll (cyclic scrolling), slide (single scrolling), Alternate (scrolling back and forth).
Align: text alignment setting. You can choose Middle, Bottom or Top.
Width: The width of the scrolling text box. Enter a value and select in Pixels (by pixels) or in Percent (by percentage) from the radio button at the back.
Height: The height of the scrolling text box. Enter a value and select in Pixels (by pixels) or in Percent (by percentage) from the radio button at the back.
loop: number of scrolls. The default is infinite
hspace, vspace: blank lines before and after, top and bottom.
Rolling subtitles will make many people excited, especially when they use rolling subtitles for the first time, they will not be able to put it down. I’ve done a lot of scrolling subtitles, and I’m no longer excited about it, so I don’t use it much now. Many friends often ask how this is done. Now I will make a detailed topic to give you a more comprehensive understanding.
Scrolling subtitles are available in FrontPage components, but FrontPage is a software that can only support single lines of text. It cannot 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 document.write in JavaScript. Please see the detailed instructions in Example d below) 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:
<marquee scrollAmount=2 width=300>靓丽风景线</marquee>
The effect is as follows: Beautiful scenery
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 include alternate (alternating scrolling) and slide (slide effect, which refers to scrolling once and then stopping scrolling)
3. Example:
a) How to add a hyperlink to rolling subtitles? This is exactly the same as a normal hyperlink. Just add 01eb31e8f611fa34f96dfb5291eb5ea5 and 5db79b134e9f6b82c0b36e0489ee08ed outside the text. The following effect, the code is a41ec5d627c0384ff641f292394c112ff8e87be7cc39bb520b85e1696da2ed91CCTV5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b, click CCTV to enter :
CCTV
b) How to make the text stop scrolling when the mouse stays on it?
The code is like:
ebb1197246486782fc5f96313abfc852Text content7204e33a7a23f6efcc788532e245c31b
The effect is like:
Text content
c) Alternating effect. The code is like:
c0b496ea3b9fe9f2e286c91d72df2ddaText content7204e33a7a23f6efcc788532e245c31b
The effect is like:
Text content
d ) multi-line text scrolls up. Code such as:
779af022b0b011cdecefd9fbca6a3fd7·Good morning! 0c6dc11e160d3b678d68754cc175188a·The air is so fresh0c6dc11e160d3b678d68754cc175188a·Are you okaye388a4556c0f65e1904146cc1a846bee·f8e87be7cc39bb520b85e1696da2ed91Beautiful scenery5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b
The effect is as follows:
·Good morning!
·The air is so fresh
·Are you okay
·Beautiful scenery
·Note: If your webpage has been edited by FrontPage, 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 embed it into JavaScript document.write. The above code is written as:
3f1c4e4b6b16bbbd69b2ee476dc4f83adocument.write('779af022b0b011cdecefd9fbca6a3fd7·Good morning! 0c6dc11e160d3b678d68754cc175188a·The air is so fresh0c6dc11e160d3b678d68754cc175188a·Are you okaye388a4556c0f65e1904146cc1a846bee·f8e87be7cc39bb520b85e1696da2ed91 Beautiful scenery5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b')9429d6e1efad07153846e528605c447e
e) Change the color of the scrolling subtitles? Can be controlled using style sheets. The following effect, the code is a41ec5d627c0384ff641f292394c112f9fe0d060187418e1bff8fef5c8a6f98dAre you okay5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b.
Are you okay?
Picture scrolling
Use the statement 5030a9d843b8051b9eefb9aff8ef8e64. And be careful not to use Chinese in the picture name, and pay attention to English case distinction.
Make a hyperlink to a picture
Use 2de933bd81cf0e954926b4b4a48640c3 and 5db79b134e9f6b82c0b36e0489ee08ed to surround a1f02c36ba31691bcfe87b2722de723b, and img must set border=0, otherwise the picture A blue box will appear. Correct examples are: & amp; lt;a href=http://www.webshu.com>3c1d22c207b7a8fa6912e5d614cde8064a11e5928b3688cf38c9163b657eb5ac
where a href= represents a hyperlink, which is the most commonly used. The practice method is also very simple, that is, when you usually use FP or DW to make web pages, you should check the source code more.
Arrange and scroll multiple pictures
Usually use 0c6dc11e160d3b678d68754cc175188a (line return) or e48ef3b8e3a1de649582bc3f0909b36d (accurate adjustment) between pictures distance between images) to link. You can also format your pictures in a table first, and then add all the statements of the table to the marquee to let the table scroll.
Code3f1c4e4b6b16bbbd69b2ee476dc4f83adocument.write('bbf0f1878dc6cc04d20cc95b1907267b< ;a href=http://www.webshu.com>3c1d22c207b7a8fa6912e5d614cde8065db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b') 2cacc6d41bbb37262a98f745aa00fbf0
<marquee style="WIDTH: 388px; HEIGHT: 200px" scrollamount="2" direction="up" ><div align="left" ><br /></div ><center ><font face="黑体" color="#008000" size="4" ></font ></center ><div align="left" ><br /></div ><center ><p ><font color="#ff6600" size="4" >滚动文字</font ></p ><p ><font color="#ff4500" size="4" >滚动文字</font ></p ><p ><font color="#ff3300" size="4" >滚动文字</font ><br /><br /></p ></marquee >
marquee Parameters:
BGColor: The background color of the scrolling text box.
Direction: Scroll direction setting, you can choose Left, Right, up and down.
scrolldelay: The delay time between each round of scrolling, the larger the time, the slower it will be.
scrollamount: The total amount of time for a scroll. The smaller the number, the slower the scrolling.
Behaviour: Setting the scrolling method, three values: Scroll (cyclic scrolling), slide (single scrolling), Alternate (scrolling back and forth).
Align: text alignment setting. You can choose Middle, Bottom or Top.
Width: The width of the scrolling text box. Enter a value and select in Pixels (by pixels) or in Percent (by percentage) from the radio button at the back.
Height: The height of the scrolling text box. Enter a value and select in Pixels (by pixels) or in Percent (by percentage) from the radio button at the back.
loop: number of scrolls. The default is infinite
hspace, vspace: blank lines before and after, top and bottom.
Rolling subtitles will make many people excited, especially when they use rolling subtitles for the first time, they will not be able to put it down. I’ve done a lot of scrolling subtitles, and I’m no longer excited about it, so I don’t use it much now. Many friends often ask how this is done. Now I will make a detailed topic to give you a more comprehensive understanding.
Scrolling subtitles are available in FrontPage components, but FrontPage is a software that can only support single lines of text. It cannot 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 document.write in JavaScript. Please see the detailed instructions in Example d below) 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:
<marquee scrollAmount=2 width=300>靓丽风景线</marquee>
The effect is as follows: Beautiful scenery
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 add a hyperlink to rolling subtitles? This is exactly the same as a normal hyperlink. Just add 01eb31e8f611fa34f96dfb5291eb5ea5 and 5db79b134e9f6b82c0b36e0489ee08ed outside the text. The following effect, the code is a41ec5d627c0384ff641f292394c112ff8e87be7cc39bb520b85e1696da2ed91CCTV5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b, click CCTV to enter :
CCTV
b) How to make the text stop scrolling when the mouse stays on it?
The code is like:
ebb1197246486782fc5f96313abfc852Text content7204e33a7a23f6efcc788532e245c31b
The effect is like:
Text content
c) Alternating effect. The code is like:
c0b496ea3b9fe9f2e286c91d72df2ddaText content7204e33a7a23f6efcc788532e245c31b
The effect is like:
Text content
d ) multi-line text scrolls up. Code such as:
779af022b0b011cdecefd9fbca6a3fd7·Good morning! 0c6dc11e160d3b678d68754cc175188a·The air is so fresh0c6dc11e160d3b678d68754cc175188a·Are you okaye388a4556c0f65e1904146cc1a846bee·f8e87be7cc39bb520b85e1696da2ed91Beautiful scenery5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b
The effect is as follows:
·Good morning!
·The air is so fresh
·Are you okay?
·Beautiful scenery
·Note: If your webpage has been edited by FrontPage, after saving, only You can 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 embed it into JavaScript document.write. The above code is written as:
3f1c4e4b6b16bbbd69b2ee476dc4f83adocument.write('779af022b0b011cdecefd9fbca6a3fd7·Good morning! 0c6dc11e160d3b678d68754cc175188a·The air is so fresh0c6dc11e160d3b678d68754cc175188a·Are you okaye388a4556c0f65e1904146cc1a846bee·f8e87be7cc39bb520b85e1696da2ed91 Beautiful scenery5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b')9429d6e1efad07153846e528605c447e
e) Change the color of the scrolling subtitles? Can be controlled using style sheets. The following effect, the code is a41ec5d627c0384ff641f292394c112f9fe0d060187418e1bff8fef5c8a6f98dAre you okay5db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b.
Are you okay?
Picture scrolling
Use the statement 5030a9d843b8051b9eefb9aff8ef8e64. And be careful not to use Chinese in the picture name, and pay attention to English case distinction.
Make a hyperlink to a picture
Use 2de933bd81cf0e954926b4b4a48640c3 and 5db79b134e9f6b82c0b36e0489ee08ed to surround a1f02c36ba31691bcfe87b2722de723b, and img must set border=0, otherwise the picture A blue box will appear. Correct examples are: & amp; lt;a href=http://www.webshu.com>3c1d22c207b7a8fa6912e5d614cde8064a11e5928b3688cf38c9163b657eb5ac
where a href= represents a hyperlink, which is the most commonly used. The practice method is also very simple, that is, when you usually use FP or DW to make web pages, you should check the source code more.
Arrange and scroll multiple pictures
Usually use 0c6dc11e160d3b678d68754cc175188a (line return) or e48ef3b8e3a1de649582bc3f0909b36d (accurate adjustment) between pictures distance between images) to link. You can also format your pictures in a table first, and then add all the statements of the table to the marquee to let the table scroll.
Code3f1c4e4b6b16bbbd69b2ee476dc4f83adocument.write('bbf0f1878dc6cc04d20cc95b1907267b< ;a href=http://www.webshu.com>3c1d22c207b7a8fa6912e5d614cde8065db79b134e9f6b82c0b36e0489ee08ed7204e33a7a23f6efcc788532e245c31b') 2cacc6d41bbb37262a98f745aa00fbf0