Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use marquee element to achieve the effect of scrolling fonts and pictures

Shulou Source: shulou.com Published: 2022-06-01 07:31:15 10月28日 Update

This article mainly introduces how to use marquee elements to achieve the effect of scrolling fonts and pictures, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

The marquee element can achieve effects such as simple font (picture, etc.) sliding:

# div01 {

Width:500px

}

Www.baidu.com111

Www.baidu.com222

Www.baidu333.com

Www.baidu444.com

Www.baidu.com555

M4.stop

M4.start

Direction indicates the direction of scrolling. The value can be left,right,up,down. The default is left.

Behavior indicates how to scroll, and the value can be scroll (continuous scrolling) slide (slide once) alternate (scroll back and forth)

Loop represents the number of loops. The value is a positive integer. The default is infinite loops.

Scrollamount represents the speed of motion. The value is a positive integer. The default is 6.

Scrolldelay represents the pause time. The value is a positive integer. The default is 0, and the unit seems to be milliseconds.

Align indicates the vertical alignment of the element. The value can be top,middle,bottom. The default is middle.

Bgcolor represents the background color of the motion area. The value is hexadecimal RGB color. The default is white.

Height and width represent the height and width of the motion area. The value is a positive integer (in pixels) or a percentage. The default width=100%height is the height of the element within the tag.

Hspace and vspace represent the horizontal and vertical distances of the element to the boundary of the region. The values are positive integers in pixels.

Onmouseover=this.stop () onmouseout=this.start () means that scrolling stops when the mouse is above the area and continues to scroll when the mouse is moved away.

The following is the setting for m3 and M4 to scroll or stop when the button is clicked:

M4.stop

M4.start

Thank you for reading this article carefully. I hope the article "how to use marquee elements to achieve the effect of scrolling fonts and pictures" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Elements integers areas articles pictures fonts effects units motion pixels mode time height mouse loop value interest at the same time width button Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information MySQL Shulou Technology Shulou Tech Info