Jquery implements simple seamless scrolling and jquery seamless scrolling
Jquery implements simple seamless scrolling
<!DOCTYPE html>
Scroll () usage:
Function scroll () {$ (". content ul "). animate ({"margin-left": "-110px"}, function () {// This is to let the entire ul first slide forward a li, if you want to slide 5 ~ It is 550px. // If You Want To scroll up, change it to $ (". content ul "). animate ({"margin-top": "-105px"} // If You Want To scroll down, change it to $ (". content ul "). animate ({"margin-top": "105px"} // you can change it to $ (". content ul "). animate ({"margin-left": "110px"} $ (". content ul li: eq (0 )"). appendTo ($ (". content ul ") $ (". content ul "cmd.css ({" margin-left ": 0}) // This corresponds to this side. // If You Want To scroll up, change it to $ (". content ul "). animate ({"margin-top": 0} // If You Want To scroll down, change it to $ (". content ul "). animate ({"margin-top": 0} // If You Want to scroll to the right, change it to $ (". content ul "). animate ({"margin-left": 0 }})} setInterval (scroll, 1000) // The above is the scroll speed of 1000, which can be adjusted by yourself
The above is all the content of this article. I hope you will like it.