最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ShrinkGrow animation using jQueryCSS - Stack Overflow

programmeradmin1浏览0评论

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.

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.

Share Improve this question asked Nov 10, 2012 at 17:51 NyxynyxNyxynyx 63.8k163 gold badges507 silver badges856 bronze badges 6
  • there are a ton of jquery modal plugins available. A little google search will likely turn up "The 30 best modals" or similar. Also known as dialog's – charlietfl Commented Nov 10, 2012 at 17:57
  • I have created the modal myself, I'll now like to animate the modal with a 'shrinking' animation. – Nyxynyx Commented Nov 10, 2012 at 18:00
  • easy to implement with jQuery animate() method api.jquery./animate Use whatever css properties you want. Also some built in effects like slideUp() , slideDown(). look into source of a plugin for ideas also.. Effects API: api.jquery./category/effects – charlietfl Commented Nov 10, 2012 at 18:01
  • I dont see Join now text anywhere in the page – defau1t Commented Nov 10, 2012 at 18:06
  • 1 @defau1t geeesh..try ctrl+F – charlietfl Commented Nov 10, 2012 at 18:07
 |  Show 1 more ment

1 Answer 1

Reset to default 8

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.

发布评论

评论列表(0)

  1. 暂无评论