Jquery 弹跳和缩放动画
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10378832/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jquery bounce and zoom animation
提问by StealthRT
Hey all i have this code here on jsfiddle: http://jsfiddle.net/d7UjD/6/
嘿,我在 jsfiddle 上有这个代码:http: //jsfiddle.net/d7UjD/6/
I have 2 problems with it:
我有两个问题:
1) I need a way to use the animation stop() so that if you rapidly run the mouse over the image lots of times it doesn't continue to play and play..
1)我需要一种使用动画 stop() 的方法,这样如果您在图像上快速运行鼠标很多次,它就不会继续播放和播放..
2) The "zoom" part i am needing home help to zoom the width AND height. Currently i can only do the width. Need to make it zoom out evenly.
2)“缩放”部分我需要家庭帮助来缩放宽度和高度。目前我只能做宽度。需要使其均匀缩小。
Any help with this would be great!
对此的任何帮助都会很棒!
David
大卫
回答by DHRUV BANSAL
animate.css .. Best solution for all the animations effects..
animate.css .. 所有动画效果的最佳解决方案..
Try this http://daneden.me/animate/
试试这个http://daneden.me/animate/
Cheers...!!!
干杯...!!!
回答by luke2012
Probably could be done differently but here is one way..
可能可以以不同的方式完成,但这是一种方法..
1) Use the mouseleave function and stop the animation on the bounce effect.
1) 使用mouseleave 功能,在弹跳效果上停止动画。
2) Use percentages (%) instead of pixels for the zoom effect.
2) 使用百分比 (%) 而不是像素来实现缩放效果。