Scrolling caption tag <marquee>

<marquee> tag

 1. The page scrolls automatically. Use the <marquee> tag to move text, tables, pictures, etc.

   Move text:

<marquee><p>text</p> | <img src='image path'/> | <table>table</table></marquee>

2.behavior: set the scrolling method,

 

Values ​​are: alternate: scroll back and forth, scroll: scroll from one end to the other. slide: scroll only once.

 

<marquee behavior="alternate">Scroll back and forth</marquee>

 3. bgcolor property: subtitle background color.

 

<marquee bgcolor="#223344">background color</marquee>

 4.direction property: scrolling direction.

Values: down: down, top: up, left: left, right: right.

<marquee behavior="left">Subtitle scrolling from right to left</marquee>

 5. height attribute: the height of the subtitle scrolling area, width attribute: the width of the subtitle scrolling area.

<marquee height="100px" width="200px">The width and height of the scrolling subtitles are 200px and 100px respectively</marquee>

 6. hspace attribute: Set the horizontal distance of the scrolling subtitle area relative to the parent class.

 

 

 

<div  style="height:500px,wigth:800px">
    <marquee hspace="50px">The horizontal distance from the DIV is 50px</marquee>
</div>

 7.vspace property: Set the vertical distance of the scrolling subtitle area relative to the parent class.

<div  style="height:500px,wigth:800px">
    <marquee hspace="30px">The vertical distance from the DIV is 30px</marquee>
</div>

 8. Loop property: Set the number of subtitle scrolling.

 

Value: -1: Infinite loop, can be numeric, default is -1.

9. scrollamount property: Set the scrolling speed of the subtitles.

The value is a number in px.

 

<marquee scrollamount="10" >Scroll speed is 10px/s </marquee>

 10. scrolldelay property: Set the delay time of subtitle scrolling,

 

The value is a numeric value in milliseconds, with a minimum value of 60 milliseconds.

 

<marquee scrolldelay="100 "> the interval of 100 milliseconds before and after two scrolls</marquee>

 11. <marquee> can be nested.

<marquee behavior="alternate"  direction="dowm">
    <marquee behavior="alternate">Subtitles scroll left and right up and down</marquee>
</marquee>

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326836488&siteId=291194637