Rotate image with javascript

后端 未结 9 753
温柔的废话
温柔的废话 2020-11-27 04:17

I need to rotate an image with javascript in 90-degree intervals. I have tried a few libraries like jQuery rotate and Raphaël, but they have the same problem - The image is

9条回答
  •  迷失自我
    2020-11-27 04:36

    You can always apply CCS class with rotate property - http://css-tricks.com/snippets/css/text-rotation/

    To keep rotated image within your div dimensions you need to adjust CSS as well, there is no needs to use JavaScript except of adding class.

提交回复
热议问题