代码如下:
//随鼠标上下滚动
$(window).bind('scroll resize',function(){
$('#sidebar').stop(true, true).animate({
'top': $(document).scrollTop() + 'px'
},500);
}).scroll().resize();
如对本文有疑问, 点击进行留言回复!!
offset、client、scroll (width,height、left,top、X,Y)
网友评论