手指点赞动画
$('.favour .css_sprites').addClass("toolbars_dianzan_pressed").removeClass("toolbars_dianzan_normal") .css({"transform": "scale(1.3) translateY(-12px) rotate(-28deg)", "transition": "all 0.15s"}); $('.favour .directive').css({ "transform": "translateY(-12px)", "display": "block", "transition": "all 0.15s" }); setTimeout(function () { $('.favour .css_sprites').css({"transform": "none", "transition": "none"}); $('.favour .directive').css({"transform": "none", "transition": "none", "display": "none"}); }, 400);
同时更换图片、放大图片、平移、旋转,然后延时清除动画 使用
{"transform": "none", "transition": "none"}
将图片回到原来的位置,即动画结束了