I want to rotate an image using css3 rotate and javascript setinterval. The image should rotate on mouseover. Anyone know how to ?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
You don't even need JavaScript to do it; just put a transition for
transform
on the element, and apply the rotation on hover. For example:Here's a demo.
You can use css3 transform property along with browser specific transform property to rotate and specify degree you want to rotate