Article introduction of Wulin.com (www.vevb.com): In this case, we will not talk about Web standards and focus on applications without the need for JavaScript. The marquee tag implements the scrolling effect conveniently and concisely.
After talking about web standards for so many years, it seems that unconventional labels like marquee have gradually faded out of sight. However, Mango just used this crappy label in the project. I think this is a reasonable and good use, and there is no need to worry about too many standard issues.
Standards are not a technology, standards are just specifications and proposals.
In this case, we have not discussed the web standards and focus on applications without the need for JavaScript. The marquee tag is convenient and concise to implement the scrolling effect.
Code example:
<marquee>This is a scrolling example</marquee>Attribute parameters:
Direction
Indicates the direction of scrolling, the value can be left, right, up, down, and the default is left
behavior
Indicates the scrolling method, the value can be scroll (scroll continuously), slide (slide once), alternate (scroll back and forth)
loop
Indicates the number of times of loops, the value is a positive integer, and the default is an infinite loop
scrollamount
Indicates the speed of motion, the value is a positive integer, the default is 6
scrolldelay
Indicates pause time, the value is a positive integer, the default is 0, and the unit is milliseconds
Valign
Indicates the vertical alignment of elements. The values can be top, middle, bottom, and default to middle
align
Indicates the horizontal alignment of elements. The value can be left, center, right, and the default is left.
bgcolor
The background color of the moving area is the value of the hexadecimal RGB color, and the default is white
height, width
Indicates the height and width of the moving area. The value is a positive integer (unit is pixel) or a percentage. The default width=100%, and the height is the height of the element in the label.
hspace, vspace
Represents the horizontal and vertical distances from an element to the boundary of the region. The value is a positive integer and the unit is a pixel.
onmouseover=this.stop() onmouseout=this.start()
It means that the scrolling stops when the area above the mouse is moved away, and continues to scroll again when the mouse is moved away.
For user experience, the effect of pausing scrolling when the mouse is moved into can be independently released using JavaScript.