效果在这里:https://jsfiddle.net/23df9ahy/
$(".yuan").hover(function(){
$(this).addClass("effect");
},function(){
$(this).removeClass("effect");
});
通过hover事件控制动画,
动画的执行是三秒,如果hover不到三秒的情况下如何让他自动回退呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这样?
demo
你这个完全不需要animation,transform+transition就行了
直接CSS hover不好吗,杀鸡用牛刀了
css:hover 当:hover触发就执行,移开就会原路返回