就像標題一樣,我想在圖像或div旋轉我的網頁。 而且,我發現在谷歌代碼中的jqueryrotate.js http://code.google.com/p/jqueryrotate/ 這位作者講述瞭如何使用jqueryrotate.js中的函數進行工作,並給出了jsfiddle中的一些示例,它看起來很棒! 但是,當它轉向我時,無論我怎麼嘗試拷貝作者的代碼,它都不起作用,圖像只是保持靜態。 我不知道它有什麼問題,並希望有人可以提供一些幫助。東西關於div和圖像旋轉360度由jquery
我的代碼編寫就像下面:
<html>
<head>
<scripttype="text/javascript"src="http://jqueryrotate.googlecode.com/svn/trunk/jQueryRotate.js"></script>
<script type="text/javascript">
var rotation = function(){
$(document).ready(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>
</head>
<body>
<img style="margin:10px;"src="/arrow.png" id="img">
</body>
</html>
我嘗試寫這樣的totura一些代碼,它只是不工作 – jabez128 2013-03-12 07:47:45
你嘗試過什麼?除非你告訴我們你已經嘗試了什麼,否則我們不能說你做錯了什麼。 – Tetaxa 2013-03-12 07:48:28
我發佈了我的代碼〜 – jabez128 2013-03-12 07:58:01