HTML marquee tag explanation

HTML marquee tag explanation

1.1 Overview
        There are two ways to realize the automatic scrolling effect of the page. The first way is realized by JS, and the second way is realized by the HTML marquee tag.
        The role of the HTML marquee tag is to insert scrolling text in an area. Using the HTML marquee tag can not only move text, but also move pictures, tables, etc.
Note: <marquee> is a deprecated feature in both HTML and HTML5, it is recommended not to use this tag.
1.2marquee tag
syntax:
        <marquee>...</marquee>; //Add the content attribute to be scrolled between the tags
:
        direction attribute, which defines the scrolling direction, including 4 values: up, down, left and right.
        The behavior attribute defines the scrolling method, and its values ​​include 3: scroll, slide and alternate (scroll: circular scrolling, the default effect [the defect is that it cannot scroll seamlessly]; slide: stop only after scrolling once; alternate: alternately scroll back and forth) .
        The scrollamount property defines the scrolling speed (the scrolling speed is the length of the movement per scroll, in pixels).
        The scrolldelay property defines the scroll delay (set the scroll time interval in milliseconds).
        The loop attribute defines the scroll loop (the default value is -1, the scroll will continue to loop).
Example:
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Instance</title>
</head>
<body>
<div>
    <marquee direction="up" behavior="scroll" scrollamount="1" scrolldelay="0" loop="-1" width="100" height="20" >广告标语</marquee>
</div>
</body>
</html>


Guess you like

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