I am looking to add an animation effect that creates a "shaking" motion on an image when hovered over. This effect is similar to the shaking of app icons on iPhones when held down for a few seconds.
Ideally, I would like to achieve this using pure CSS3, but I am open to using Javascript/jQuery if necessary.
Currently, I have only been able to create a one-way rotation using pure CSS:
img:hover {
-webkit-transform: rotate(3deg);
-webkit-transition: all 0.5s ease-in-out;
}
As for browser compatibility, the only requirement is that it works in Chrome.