问题描述:

Is it possible to create a rocking effect in jquery?To be honest I can't imagine how it could work but I am relatively new to jquery and it's always better to ask.

http://img163.imageshack.us/img163/9049/63148139.jpg

as you can imagine the square(in 3 stages) should move on the line.

网友答案:

Is this what you are looking for?

http://docs.jquery.com/UI/Effects/Shake

You need of course to include jQuery UI, or at least parts of it.

EDIT: After your elaboration, I think you are looking to animate the rotation, which can be done with CSS3. http://www.the-art-of-web.com/css/css-animation/

You can animate the position as well, if that helps you.

相关阅读:
Top