Javascript 使用jquery摆动图像
我想使用jQuery摆动一个图像。我已经阅读了很多教程,但我无法找到如何做到这一点。您也可以使用CSS:Javascript 使用jquery摆动图像,javascript,php,jquery,html,Javascript,Php,Jquery,Html,我想使用jQuery摆动一个图像。我已经阅读了很多教程,但我无法找到如何做到这一点。您也可以使用CSS: 希望有帮助。请展示您的代码尝试使用jquery animate,但对象是您的图像(例如:img#pict1)参考:hell yahh。。。。我找到了。。它的接力棒极了……这是链接 bod{ background:blue; } .box{ width:50px; height:50px; background: yellow; border: 1px solid
希望有帮助。请展示您的代码尝试使用jquery animate,但对象是您的图像(例如:img#pict1)参考:hell yahh。。。。我找到了。。它的接力棒极了……这是链接
bod{
background:blue;
}
.box{
width:50px; height:50px;
background: yellow;
border: 1px solid black;
margin:100px;
position: relative;
float: left;
-moz-animation: 3s ease 0s normal none infinite swing;
-moz-transform-origin: center top;
-webkit-animation:swing 3s infinite ease-in-out;
-webkit-transform-origin:top;
}
@-moz-keyframes swing{
0%{-moz-transform:rotate(-500deg)}
50%{-moz-transform:rotate(500deg)}
100%{-moz-transform:rotate(-500deg)}
}
@-webkit-keyframes swing{
0%{-webkit-transform:rotate(-500deg)}
50%{-webkit-transform:rotate(500deg)}
100%{-webkit-transform:rotate(-500deg)}
}