Javascript 掉落和弹跳效果
我似乎找不到像我想要的那样工作的 javascript(jQuery 或其他)效果。我希望有人能帮助我。
我正在开发一个项目,该项目在一个较大的 div 中包含 3 个内容框。我正在考虑添加一个“获取报价”按钮,当您单击“获取报价”时,该按钮将采用较大的周围 div 并将其放下(想想史酷比(将书从书柜中拉出,然后墙壁掉落))并让它在撞击时弹起,就像它实际上有重量一样。然后在用户填写“获取报价”表单后返回。
我希望这有一点意义。 只需询问您是否需要澄清,或者是否希望我发布其工作原理的草图。
I can't seem to find a javascript(jQuery or other) effect that works like I want it to. I was hoping someone can help me out.
I am working on a project that has 3 content boxes wrapped within a larger div. I am thinking of adding a "Get A Quote" button that will take the larger surrounding div and drop it when you click on the "Get A Quote" (think scooby doo(pull book out of bookcase and the wall drops)) and have it bounce when it hits like it actually has weight. Then go back up after the user has filled out the "Get A Quote" form.
I hope that makes a marginal bit of sense.
Just ask if you would like clarification or if you would like me to post a sketch of how it works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 JQuery UI 中已经可用的功能。 http://jqueryui.com/demos/show/。
这就是你如何做到的
看到一个工作示例
你可以在 http://jsfiddle.net/TUFaw/ 使用切换,这意味着如果您再次单击该按钮,效果将恢复为隐藏该框。您可以使用许多可用的效果(遮蔽、剪辑、下降、爆炸、折叠、突出显示、膨胀、脉动、摇动、滑动、大小、缩放)。
如果您以前从未使用过 jQuery,请确保包含所需的 CSS 和 JS文件。
This is an already available feature in JQuery UI. http://jqueryui.com/demos/show/.
This is how you do it
You can see a working example at http://jsfiddle.net/TUFaw/
I used toggle which means if you click on the button again, the effect will be revered back to hide the box. You can use many of the available effect (blind, clip, drop, explode, fold, highlight, puff, pulsate, shake, slide, size, scale)
If you never worked with jQuery before, make sure you include the required CSS and JS files.