ウェブサイトに回転ロゴを入れたいです。私はそれが継続的に回転している必要があることを意味します。私はjqueryでこのようにしてみました。見て、どこが間違っているのか教えてください。このコードが機能しない理由。私を助けてください
var rotation = function (){
$("#img").rotate({
angle:0,
animateTo:360,
callback: rotation,
easing: function (x,t,b,c,d){ // t: current time, b: begInnIng value, c: change In value, d: duration
return c*(t/d)+b;
}
});
}
rotation();
私はこのコードを私のhtmlでこのように使用しました
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="jquery-1.4.4.js"></script>
<script type="text/javascript" src="jquery.easing.1.3.js"></script>
<script type="text/javascript">
var rotation = function (){
$("#img").rotate({
angle:0,
animateTo:360,
callback: rotation,
easing: function (x,t,b,c,d){ // t: current time, b: begInnIng value, c: change In value, d: duration
return c*(t/d)+b;
}
});
}
rotation();
</script>
<title>Untitled Document</title>
</head>
<body>
<img src="LMIH_LOGO.png" width="174" height="322" name="img" id="img" />
</body>
</html>
動いていない。誰かがこれで私を助けてください