Transform in jQuery

后端 未结 9 1171
野趣味
野趣味 2020-12-06 03:24

I\'m trying to get an element to animate a rotation hover effect using jquery, I have this jsFiddle going to test. So Far I have this:

$(\".icon\").hover(fun         


        
9条回答
  •  借酒劲吻你
    2020-12-06 04:06

    I used this for scale:

    var zoom_level = .4,
        multiplier = .2;
    $('button.zoom-in, button.zoom-out').click(function(){
        zoom_level += $(this).hasClass('zoom-in') ? multiplier : -(multiplier);
    
        $('.floor').css({
            '-webkit-transform': 'scale(' + zoom_level + ')'
        });
    });
    

提交回复
热议问题