How to rotate image when scrolling using CSS transform?

后端 未结 5 1200
忘掉有多难
忘掉有多难 2021-01-01 06:01

I\'m not sure how to use using jQuery, but has a CSS3 property: transform: rotate

it could be used along with jQuery?

transform:rotate;
-ms-transform         


        
5条回答
  •  情书的邮戳
    2021-01-01 06:46

    Something like this, jQuery should use the correct css3 prefix. http://jsfiddle.net/g3k6h/2/

    $(function() {
        $('.gear').click(function() {
            $(this).css('transform', 'rotate(30deg)'); 
        });
    });
    

提交回复
热议问题