我有一個圖像,每次點擊它我想旋轉180度。這是我試過的代碼:如何點擊圖片旋轉
<img id="showLayers" class="miniToolbarContant" src="../stdicons/GeomindIcons/slide.png"/>
$('#showLayers').click(function() {
$('#showLayers img').animate({ rotate: 180 });
});
此代碼不能出於某種原因。任何想法爲什麼上面的代碼不起作用?
經過這個堆棧溢出[鏈接](http://stackoverflow.com/questions/14396614/rotate-image-with-onclick)可可以幫助你。 –
[CSS jquery.animate()循環瀏覽器的可能重複](http://stackoverflow.com/questions/15191058/css-rotation-cross-browser-with-jquery-animate) – Justinas