87,907
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>test.html</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script>
$(function(){
$('#imgs').click(function() {
$(this).animate({'top':'-=10px'});//向上移动10px
});
})
</script>
</head>
<body>
<img src="top.jpg" id="imgs" style="position:absolute;top:100px;"/>
</body>
</html>