[英]trying to make a div slide down and up from top of page using - top positioning and jquery animate upon click
[英]JQuery Animate() slide div up from bottom of page
希望简单,但尝试从其他SO问题实施答案无济于事。
我有一个div我想在文档加载时从页面底部向上滑动。 但是,我似乎无法让JQuery工作。 这是我有的:
#content {
width: 640px;
margin:auto;
margin-top: 2000px;
}
$(function(){
$('#content').animate({MarginTop: '50px',} 1000);
});
基本上,我只是想在页面加载时缩小margin-top
距离。
谁能指出我正确的方向? 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.