Mel*_*Dog 9 html javascript jquery jquery-animate
希望简单,但尝试从其他SO问题实施答案无济于事.
我有一个div我想在文档加载时从页面底部向上滑动.但是,我似乎无法让JQuery工作.这是我有的:
#content {
width: 640px;
margin:auto;
margin-top: 2000px;
}
$(function(){
$('#content').animate({MarginTop: '50px',} 1000);
});
Run Code Online (Sandbox Code Playgroud)
基本上,我只想缩小margin-top页面加载时的距离.
谁能指出我正确的方向?谢谢
tim*_*boy 18
尝试:
$('#content').animate({'margin-top': '50px'}, 1000);
Run Code Online (Sandbox Code Playgroud)