我正在尝试使用 CSS3 和 Jquery 使一些图标在悬停时跳转。反弹动画附加到样式表中的 .bounce
类;为了处理悬停,我告诉 Jquery 在鼠标分别进入和离开图像的父元素时添加和删除 bounce
类。虽然 Jquery 按预期工作,但动画却没有,我不确定为什么。
Here's the fiddle.感谢您的帮助。
最佳答案
你错过了动画持续时间:
.bounce {
// this is the shorthand definition
-webkit-animation: bounce 1s ease infinite;
-moz-animation: bounce 1s ease infinite;
-o-animation: bounce 1s ease infinite;
animation: bounce 1s ease infinite;
}
关于jquery - 使用 JQuery 悬停时触发 CSS3 动画不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12309241/