Jquery Vert Scroller - 只移动body,html - 而不是#div?

时间:2012-04-03 10:48:51

标签: jquery

http://subzerostudio.com/temp/verticalscroller/temp.html

我想让这个滚动影响div#container而不是body,html

但如果我改变

$("body,html").animate({

$("#container").animate({

它破了..?

1 个答案:

答案 0 :(得分:0)

您只能滚动滚动窗格。只要#container的溢出没有设置为滚动,它就不会做任何事情。如果要将浏览器的视口滚动到元素#container,您应该确实为html元素上的滚动设置动画。