Javascript to minimize <div> using Genie effect? [closed]

给你一囗甜甜゛ 提交于 2019-12-12 08:12:10

问题


I'd like to minimize a box, much like a popup popin in genie effect on a Mac, I found jQuery Transfer effect to be a close, but not quite enough, it only draws an outline and doesn't actually smear the object, is there a way to mimic the genie minimize effect of Mac?

Thanks.


回答1:


This effect will not be possible with pure DOM manipulation. The flow and shape of an element is determined by rendering engine of the browser. You can apply CSS3 transformations but even this is limited to a subset of the combined steps you would need to achieve this look. However if you could handle Flash being part of this solutions you have many more options:

http://wonderfl.net/c/qnTR

This example is cracking me up (best Hello World ever!):

http://swingpantsflash.com/genie_transition/genietransition.html




回答2:


You can achieve the Genie effect if you use a canvas library. Here's one called CAAT.

Try using the fadeInUpBig and fadeOutDownBig classes from animate.css




回答3:


There isn't anything that is similar to the genie effect. The closest animation you can get is if you make something on your own using CSS transforms (using scale and skew) and jQuery callbacks. Standard CSS properties of setting the top, left, width, and height values won't get you the effect you're after.



来源:https://stackoverflow.com/questions/11659147/javascript-to-minimize-div-using-genie-effect

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