Shrink/Grow animation using jQuery/CSS

雨燕双飞 提交于 2019-12-11 12:10:03

问题


How can a grow/shrink animation be done with jQuery and/or CSS? An example that I can think of is this when you click on the Join Now button.

I looked into animate.css but they did not offer such an animation.


回答1:


DEMO — Solution using CSS3's transition-duration (W3Schools) and transform:scale(X,Y); (W3Schools).

Update:

DEMO — Going a step further, doing more than just changing to opacity:0; by adding display:none; (via jQuery .hide()) at the end of the animation.



来源:https://stackoverflow.com/questions/13324537/shrink-grow-animation-using-jquery-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!