$("html, body").animate({ scrollTop: $("#blockDiv").offset().top }, {duration: 500,easing: "swing"}); https://www.jb51.net/article/96574.htm