让DIV随滚动条滚动时间:2023-03-09 20:02:19 $(window).scroll(function(event){ //JQ监听滚动条 $('DIV').css("top", $(window).scrollTop()-300);//设置DIV的top});