


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 and outside the text. The following effect, the code is , click CCTV to enter :
CCTV
b) How to make the text stop scrolling when the mouse stays on it?
The code is like:
The effect is like:
Text content
c) Alternating effect. The code is like:
The effect is like:
Text content
d ) multi-line text scrolls up. Code such as:
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:
<script>document.write('<marquee scrollAmount=2 width=300 height=160 direction=up>·Good morning! <br>·The air is so fresh<br>·Are you okay<p>·<a href=http://www.cctv.com> Beautiful scenery</a></marquee>')< /script></p> <p> </p> <p>e) Change the color of the scrolling subtitles? Can be controlled using style sheets. The following effect, the code is <marquee scrollAmount=2 width=300><a style=color:CC6600>Are you okay</a></marquee>. <br />Are you okay?</p> <p> </p> <p>Picture scrolling<br />Use the statement <img src=relative path/file name>. And be careful not to use Chinese in the picture name, and pay attention to English case distinction. </p> <p> </p> <p>Make a hyperlink to a picture<br />Use <a href=> and </a> to surround <img>, 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><img src=http://www.cnblogs.com/j/01.jpg border=0></ a><br />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. </p> <p> </p> <p>Arrange and scroll multiple pictures<br />Usually use <br> (line return) or <p style=margin-top:9> (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. </p> <p> </p> <p>Code<script>document.write('<marquee scrollAmount=2 width=340 height=160 direction=up onmouseover=stop() onmouseout=start()>< ;a href=http://www.webshu.com><img src=http://www.cnblogs.com/j/01.jpg border=0></a></marquee>') </script>
<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 and outside the text. The following effect, the code is , click CCTV to enter :
CCTV
b) How to make the text stop scrolling when the mouse stays on it?
The code is like:
The effect is like:
Text content
c) Alternating effect. The code is like:
The effect is like:
Text content
d ) multi-line text scrolls up. Code such as:
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:
<script>document.write('<marquee scrollAmount=2 width=300 height=160 direction=up>·Good morning! <br>·The air is so fresh<br>·Are you okay<p>·<a href=http://www.cctv.com> Beautiful scenery</a></marquee>')< /script></p> <p> </p> <p>e) Change the color of the scrolling subtitles? Can be controlled using style sheets. The following effect, the code is <marquee scrollAmount=2 width=300><a style=color:CC6600>Are you okay</a></marquee>. <br>Are you okay?</p> <p> </p> <p>Picture scrolling<br>Use the statement <img src=relative path/file name>. And be careful not to use Chinese in the picture name, and pay attention to English case distinction. </p> <p> </p> <p>Make a hyperlink to a picture<br>Use <a href=> and </a> to surround <img>, 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><img src=http://www.cnblogs.com/j/01.jpg border=0></ a><br>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. </p> <p> </p> <p>Arrange and scroll multiple pictures<br>Usually use <br> (line return) or <p style=margin-top:9> (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. </p> <p> </p> <p>Code<script>document.write('<marquee scrollAmount=2 width=340 height=160 direction=up onmouseover=stop() onmouseout=start()>< ;a href=http://www.webshu.com><img src=http://www.cnblogs.com/j/01.jpg border=0></a></marquee>') </script>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.
