Let's take a look at the HTML attributes of Marquee.
<Marquee align = "... "
Behavior = "... "
Bgcolor = "... "
Direction = "... "
Height = "... "
Width = "... "
Hspace = "... "
Vspace = "... "
Loop = "... "
Scrollamount = "... "
Scrolldelay = "... "
>...
</Marquee>
Align: -- left, center, right, top, bottom (needless to say)
Behavior: -- used to set the scroll mode, mainly in three ways:
Behavior = "scroll" -- indicates rolling from one end to the other;
Behavior = "slide": -- indicates that one end quickly slides to the other end without repeating it;
Behavior = "alternate" Default Value -- indicates rolling back and forth between the two ends.
Innercode -- set or obtain the code located in the start and end tags of the object
Innertext -- set or obtain the text in the object's start and end labels
Scrollleft -- sets or obtains the distance between the left-side border of the object and the leftmost end of the currently visible content in the window.
Scrolltop -- set or get the distance between the top of the object and the top of the visible content in the window
PS: Well, don't take it for granted that there are scrollrigh and scrolldown.
Scrolldelay -- set or get the subtitle scroll speed
To create a vertical scroll subtitle, set its scrollleft attribute to 0.
To create a horizontal scroll subtitle, set its scrolltop attribute to 0, which overwrites any script settings.
Scrollheight -- get the scroll height of an object
Scrollamount -- sets or obtains the number of text scrolling sequences between each subtitle draw sequence.
Offsettop -- obtains the top position of an object relative to the layout or the parent coordinate specified by the offsettop attribute.
Offsetleft -- obtains the left position of an object relative to the layout or the parent coordinate specified by the offsetparent attribute.
Offsetheight -- obtains the height of an object relative to the layout or the parent coordinate specified by the parent coordinate offsetparent attribute.
Setinterval (expression, interaction time) is different. It executes the expression once every specified time after loading.
Clearinterval uses the setinterval method to cancel the previous interval events.
Code:
Amy's tears
amily