简体   繁体   中英

Shrink/Grow animation using jQuery/CSS

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM