87,910
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".btn1").click(function(){
$("img").animate({top:"100px"});
});
$(".btn2").click(function(){
$("img").animate({top:"0px"});
});
});
</script>
</head>
<body>
<button class="btn1">Animate</button>
<button class="btn2">Reset</button>
<div style="position:relative">
<img src="1.png" style="position:absolute"/>
</div>
</body>
</html>
$("img").animate({top:"0px"},"10000");});