当前位置:首页 > Web开发 > 正文

jQuery控制页面滚动条上下滚动

11-13 Web开发

1.向上滚动  $(this).animate({ scrollTop: "-=50" }, 1000); 2.向下滚动   $(this).animate({ scrollTop: "+=50" }, 1000); 参数解读:$(this)表示要实现上下滚动的对象,-50表示向上滚动50px , +50表示向下滚动50px ,1000表示滚动速度

jQuery控制页面滚动条上下滚动

温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/web/10307.html