The mouse of the marquee label is put on the scroll effect and the mouse is left to continue to scroll

The effect is very practical, you can easily realize the effect of stopping the scrolling when the mouse is placed on it, and continuing to scroll when the mouse is left. The following is the specific usage (especially note that onMouseOver and onMouseOut need to be written at the same time to have a better effect):
onMouseOut="this.start()" : Used to set the mouse to continue scrolling when the mouse moves out of the area
onMouseOver="this. stop()": used to set the scrolling to stop when the mouse moves into the area

code show as below:
<marquee onMouseOut="this.start()" onMouseOver="this.stop()">onMouseOut="this.start()" : Used to set scrolling when the mouse moves out of the area onMouseOver="this.stop()" : Used to stop scrolling when the mouse moves into the area</marquee>
 
Here is a complete example:

code show as below:
<marquee id="affiche" align="left" behavior="scroll" bgcolor="#FF0000" direction="up" height="300" width="200" hspace="50" vspace="20" loop="-1" scrollamount="10" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()">
这是一个完整的例子
</marquee>
 

This tag supports up to 11 attributes:
 

align
sets the alignment of the <marquee> tag content
absbottom: Absolute bottom alignment (aligned with the bottom end of letters such as g, p, etc.)
absmiddle: absolute center alignment
baseline: bottom line alignment
bottom: bottom alignment (default)
left: left alignment
middle: center alignment
right: right alignment
texttop: top line alignment
top: top alignment

code show as below:
<marquee align="absbottom">align="absbottom": Absolute bottom alignment (aligned with the bottom of the letter g, p, etc.). </marquee>
<marquee align="absmiddle">align="absmiddle": Absolute center alignment. </marquee>
<marquee align="baseline">align="baseline": Baseline alignment. </marquee>
<marquee align="bottom">align="bottom": Bottom alignment (default). </marquee>
<marquee align="left">align="left": Left-aligned. </marquee>
<marquee align="middle">align="middle": center alignment. </marquee>
<marquee align="right">align="right": Align right. </marquee>
<marquee align="texttop">align="texttop": Top line alignment. </marquee>
< marquee align="top">align="top": Top alignment. </marquee>
 

The behavior
sets the way of scrolling:
alternate: Indicates scrolling back and forth between the two ends.
scroll: Indicates scrolling from one end to the other, repeating.
slide: Indicates scrolling from one end to the other without repeating.
code show as below:
<marquee behavior="alternate">alternate: Indicates scrolling back and forth between the two ends. </marquee>
<marquee behavior="scroll">scroll: means scrolling from one end to the other, repeating. </marquee>
<marquee behavior="slide">slide: Indicates scrolling from one end to the other without repeating. </marquee>
 

bgcolor
sets the background color of the active subtitle. The background color can be set in the format of RGB, hexadecimal value or color name.
code show as below:
<marquee bgcolor="#006699">Set the background color of the active subtitle bgcolor="#006699"</marquee>
<marquee bgcolor="RGB(10%,50%,100%,)">Set the background color of the active subtitle Background color bgcolor="rgb(10%,50%,100%,)"</marquee>
<marquee bgcolor="red">Set the background color of the active subtitle bgcolor="red"</marquee>
 

direction
sets the scrolling direction of the active subtitle
code show as below:
<marquee direction="down">Set the scrolling direction of the active subtitle direction="down": Down</marquee>
<marquee direction="left">Set the scrolling direction of the active subtitle direction="left": Left </marquee>
<marquee direction="right">Set the scroll direction of the active subtitle direction="right": Right</marquee>
<marquee direction="up">Set the scroll direction of the active subtitle direction="up ":up</marquee>
 

height
sets the height of the active subtitle
The code is as follows:
<marquee height="500" direction="down" bgcolor="#CCCCCC">Set the height of the active subtitle height="500"</marquee>
 

width
sets the width of the active subtitle
The code is as follows:
<marquee width="500" bgcolor="#CCCCCC">Set the width of the active subtitle width="500"</marquee>
 
hspace This controls
the
horizontal space around the display box. This controls the horizontal space around the display box.
code show as below:
  <table width="500" border="1" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><marquee hspace="100" bgcolor="#CCCCCC">hspace="100"</marquee></td>
    </tr>
  </table>
 

vspace This controls
the
vertical space around the display box. This controls the vertical space around the display box.
代码如下:
<marquee vspace="100" bgcolor="#CCCCCC">hspace="100"</marquee>
 
loop
sets the number of times of scrolling. When loop=-1, it means scrolling all the time. The default is -1.
code show as below:
<marquee loop="-1" bgcolor="#CCCCCC">I will keep walking. </marquee>
<p> </p>
<marquee loop="2" bgcolor="#CCCCCC">I only go twice</marquee>
 

scrollamount
sets the scrolling speed of the active subtitle, in pixels
code show as below:
<marquee scrollamount="10" >scrollamount="10" </marquee>
<marquee scrollamount="20" >scrollamount="20" </marquee>
<marquee scrollamount="30" >scrollamount="30" </marquee>
 

scrolldelay
sets the delay time between two scrolls of the active subtitles, the unit millisecond (millisecond)
value is larger, there will be a one-step pause effect
code show as below:
<marquee scrolldelay="10" >scrolldelay="10" </marquee>
<marquee scrolldelay="100" > scrolldelay="100"</marquee>
<marquee scrolldelay="1000">scrolldelay="1000" </marquee>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324894513&siteId=291194637