Continuous CSS rotation animation on hover, animated back to 0deg on hover out

后端 未结 7 1545
温柔的废话
温柔的废话 2020-11-30 22:26

I have an element that spins when you hover over it indefinitely. When you hover out, the animation stops. Simple:

@-webkit-keyframes rotate {
    from {
            


        
相关标签:
7条回答
  • 2020-11-30 23:06

    You should trigger the animation to revert once it's completed w/ javascript.

      $(".item").live("animationend webkitAnimationEnd", function(){
        $(this).removeClass('animate');
      });
    
    0 讨论(0)
提交回复
热议问题