为了账号安全,请及时绑定邮箱和手机立即绑定

悬停后如何在鼠标移出时反转动画

悬停后如何在鼠标移出时反转动画

达令说 2019-11-29 10:04:47
因此,有可能在鼠标移开时出现反向动画,例如:.class{   transform: rotate(0deg);}.class:hover{   transform: rotate(360deg);}但是,当使用@keyframes动画时,我无法使其工作,例如:.class{   animation-name: out;   animation-duration:2s;}.class:hover{   animation-name: in;   animation-duration:5s;   animation-iteration-count:infinite;}@keyframe in{    to {transform: rotate(360deg);}}@keyframe out{    to {transform: rotate(0deg);}}知道我需要迭代和动画本身,什么是最佳解决方案?http://jsfiddle.net/khalednabil/eWzBm/
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 1636 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信