<html> <head> <title></title> </head> <style> *{ margin:0; padding:0; } .father{ width:100px; height:100px; overflow:auto; } </style> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(function(){ console.log($('.father').scrollTop()) //获取div的滚动距离 $('.father').scrollTop(100) //
jQuery中获取scroll滚动的距离
最新推荐文章于 2021-05-25 10:29:48 发布