Home >Web Front-end >HTML Tutorial >Skillfully use the marquee attribute in HTML to realize dancing text

Skillfully use the marquee attribute in HTML to realize dancing text

PHP中文网
PHP中文网Original
2017-03-17 15:08:492638browse

Syntax:
Using the mobile attribute marquee, you can not only dance your text, but also apply it to pictures, tables, etc.
Welcome to the php Chinese website!
direction=left, indicating the direction. The above text effect is "Welcome to Kexun Youth Learning Channel!" Move from right to left! In addition, the directions include right, up, and down.
In addition to direction, we can also add other restrictive elements:
Movement method:
Loop movement: loop=n (n, indicating the number of times) Moving in circles: behavior=scroll Only move once: behavior=slide Move back and forth: behavior=alternate
Appearance, font size : (n, variable) Alignment: align=top/middle/bottom Background color: bgcolor=Blue (predefined colors, such as: Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime, Fuchsia, White, Green, Purple, Silver, Yellow, Aqua or hexadecimal number)
Others: Speed: scrollamount=n (n, variable) Delay: scrolldelay ==n(n, variable)
"
onmouseover sets the mouse to pause movement when it is placed in the moving area
onmouseout continues scrolling when the mouse leaves

Use marquee code to implement text scrolling and image scrolling

I saw the setting of scrolling text in TAP today! It seems that it was not supported before! I haven’t used it before! Let me show you the effect!
The following code explanation comes from the up and down scrolling text bulletin board known by TAP
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 it is, the slower it is.
Scrollamount: The total time of one scroll, the smaller the number. The slower the scrolling.
Behaviour: scrolling mode setting, three values: Scroll (cyclic scrolling), Alternate (back and forth scrolling): Optional text alignment setting. Middle (centered), Bottom (centered) or Top (centered)
Width: The width of the scrolling text box, enter a value and select in Pixels (by pixels) or in Percent (
Height: The height of the scrolling text box, enter a value and select in Pixels (by pixels) or in Percent (by percentage). Default number. For infinite
hspace, vspace: blank lines before and after, top and bottom.
The following demo is my bulletin board demo: you can see the effect in the lower right corner! If you like it, copy the code and insert it into the above code explanation. It works!
Effect 1: Text scrolls up


Effect 2: Text scrolls to the left

[Announcement] Some tutorials are original to Tap, please indicate the source when reprinting! Detailed usage analysis of marquee
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn