我一直在尝试这样做,但它不起作用.它应该将图像移动10px,但事实并非如此.那个div left里面有css,我想是因为那个.我试过了!important,但没办法.
这是JSFiddle:https://jsfiddle.net/jwbvxhv0/1/
$(".seen").bind("webkitAnimationEnd mozAnimationEnd animationEnd", function(){
$(this).removeClass("animated")
})
$(".seen").hover(function(){
$(this).addClass("animated");
})
Run Code Online (Sandbox Code Playgroud)
@-webkit-keyframes example {
0% {
left: 0px;
}
25% {
left: 10px ! important;
}
100% {
left: 0px;
}
}
.seen.animated {
position: relative;
-webkit-animation-name: example;
-webkit-animation-duration: 2s;
}
Run Code Online (Sandbox Code Playgroud)