我正在尝试使此代码正常工作,但在尝试了很多之后我仍然无法运行它。图像应该动画,但它不工作。有什么想法有什么问题吗?谢谢
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script type=""
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
img
{
position:absolute;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$zombie = $('img#flickr');
function runit(){
$zombie
.animate({ opacity: 1 },100)
.animate({top:'300px',left:'300px'}, {duration:2000})
.animate({top:'260px',left:'340px'}, {duration:2000})
.animate({top:'220px', left:'380px'}, {duration:2000})
.animate({top:'180px', left:'420px'}, {duration:2000})
.animate({top:'140px', left:'460px'}, {duration:2000})
.animate({top:'100px', left:'500px'}, 2000,function(){
runit();
});
}
runit();
});
</script>
</head>
<body>
<!--<img id ="flickr" src="9.png" />
-->
<img id ="flickr" src="http://placekitten.com/g/200/300" />
</body>
</html>