This article mainly introduces the HTML code to produce scrolling text. It has a certain reference value. Now I share it with you. Friends in need can refer to it.
In this section, the author talks about the special features of HTML code. Tag, which can scroll the text in the web page and control its scrolling properties.
Create scrolling text Through the previous studies in this chapter, readers have been able to well control the display method of various paragraph text, but no matter how they are set, the text is static.
In this section, the author talks about the special tags in HTML code, which can make the text in the web page scroll and control its scrolling properties.
Create scrolling text Through the previous studies in this chapter, readers have been able to well control the display mode of various paragraph text, but no matter how they are set, the text is static. In this section, the author describes the special tags in HTML code, which can scroll the text in the web page and control its scrolling properties. 4.3.1 Set text scrolling The way to scroll text in HTML technology is to use double tags
. In the HTML code, the text in the scope can be scrolled. The default is from right to left and circular scrolling. Create a web page file in the D:\web\ directory, name it mar.htm, and write the code as shown in Code 4.15. Code 4.15 Text scrolling setting: mar.htm
文字滚动的设置
文字滚动示例(默认):
Copy after login
Enter http://localhost/mar.htm in the browser address bar, and the browsing effect is as shown in Figure 4.15.
Figure 4.15 Set the default form of text scrolling From Figure 4.15, it can be seen that when the width is not set, the
label occupies an exclusive line. 4.3.2 Set the direction of text scrolling
The direction attribute of the tag is used to set the direction of content scrolling. The attribute values are left, right, up, and down. , representing left, right, up, and down respectively, such as the following code: