正在尝试重新创建此文件:
http://jsfiddle.net/pvq111u9/
它旋转了360度,然后停了下来。松弛函数未被调用...甚至尝试包括jquery.easing.min.js ..。
<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<img src="picpath" id="image">
<script type="text/javascript">
var rotation = function (){
$("#image").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();
发布于 2016-03-17 03:35:39
你确定你关闭了你的script标签?为我工作fiddle
发布于 2016-03-17 03:38:10
您需要将图片的扩展文件、jquery库和关闭的</script>标签放入,例如:
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.1.min.js"></script>
<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<img src="descarga.jpg" id="image">
<script type="text/javascript">
var rotation = function (){
$("#image").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>https://stackoverflow.com/questions/36045175
复制相似问题