Application Description: The page contains <script type = "text/javascript" src = "MSClass. js"> </script>
Create an instance:
// Direct parameter value assignment
New Marquee ("marquee ")
New Marquee ("marquee", "top ")
......
New Marquee ("marquee)
New Marquee ("marquee", "top", 1,760, 5000)
......
New Marquee ("marquee", 760,104)
New Marquee ("marquee", null, null, 760,104, null, 5000, null,-1)
// Dynamic parameter value assignment
Var marquee1 = new Marquee ("marquee") * this parameter is required.
Marquee1.Direction = "top"; or marquee1.Direction = 0;
Marquee1.Step = 1;
Marquee1.Width = 760;
Marquee1.Height = 52;
Marquee1.Timer = 50;
Marquee1.DelayTime = 5000;
Marquee1.WaitTime = 3000;
Marquee1.ScrollStep = 52;
Marquee1.Start ();
Parameter description:
ID "marquee" container ID (required)
Ction (0) scroll Direction (optional, default: 0 scroll up) configurable values include: 0, 1, 2, 3, "top", "bottom", "left ", "right" (0 up 1 down 2 to left 3 to right)
Step (1) the scroll Step (optional, default value: 2, the larger the value, the faster the scroll)
Width (760) visible Width of the container (optional, default value: Width initially set by the container)
Height (52) visible Height of the container (optional, the default value is the initial Height of the container)
Timer (50) Timer (optional, the default value is 30. The smaller the value, the faster the scroll speed, 1000 = 1 second. It is recommended that the Timer be no less than 20)
DelayTime (5000) interval pause Delay Time (optional, default: 0, 1000 = 1 second)
WaitTime (3000) Start Time (optional, default or 0 is not waiting, 1000 = 1 second)
ScrollStep (52) interval between intermittent scrolling (optional. The default value is screen flip width/height. If the value and latency are both 0, the cursor is placed over the control, and-1 disables mouse control)
Suggestions:
1. We recommend that you directly assign the width and height of the display area of the container, for example, (<div id = "marquee" style = "width: 760px; height: 52px; "> ...... </div>)
2. We recommend that you add the style overflow = auto for the container, such as (<div id = "marquee" style = "width: 760px; height: 52px; overflow: auto; "> ...... </div>)
3. To get the width and height of the rolling area more accurately, please assign each rolling unit the correct width and height as much as possible.
4. For horizontal scrolling of TABLE tags, you need to add the style display = inline to the TABLE, such as (<div id = "marquee" style = "width: 760px; height: 52px; overflow: auto; "> <table style =" display: inline "> ...... </table> </div>)
5. For screen flip or intermittent scrolling, pay attention to the spacing between each Rolling Unit. At the same time, set the visible height and width of the container accurately, you can adjust the spacing between each scroll unit by setting the row spacing or the height of the cell.
6. There is no better solution to the LI automatic line feed problem. We recommend that you convert it into a TABLE to achieve the same effect.
7. For text paragraphs that are horizontally scrolling, if the ending point is a space, convert the space to & nbsp ;"
8. The concept of hovering and scrolling is derived from Flash, therefore, there are some limitations (only images with or images with Links <a> </a> are allowed in the container, and automatic line feed must be disabled)
Thanks:
Scholar in the sky (QQ: 30370740) (Bug on IE page white)
Week