Native JavaScript Upward Scrolling Message Box
Add-ons

Plugin Description: A simple and practical scrolling message box implemented with native JavaScript.
This plugin is very easy to use.
You only need to import two files. The total size is only 1 KB.
1 2 | <link rel="stylesheet" type="text/css" href="scroll.css"/><script src="scroll.js" type="text/javascript" charset="utf-8"></script> |
!-- DOM structure goes here -->
1 2 3 4 5 6 7 | <ul id="demo"> <li>I am the first item to appear</li> <li>I am the second item to appear</li> <li>I am the third item to appear</li> <li>I am the fourth item to appear</li> <li>The loop starts here (fifth item)</li></ul> |
Initialization method
1 2 3 4 5 6 7 | /** ID of the demo parent container (ul)* -36px Height of the child element li* 3000 Scrolling interval in milliseconds* The duration of each scroll can be modified in the CSS file*/myScroll.upScroll("demo","-36px",3000); |
评论