是否有一个不错的jQuery插件来实现隐藏效果,就像将Windows中的窗口最小化一样 [英] Is there a good jQuery plugin for a hide effect that looks like minimizing windows in Windows
问题描述
就像标题中指出的那样,是否有一个jQuery插件效果,使我能够以类似于Windows的方式隐藏div?因此,div将移动,缩小并变得透明到屏幕上的某个点.这是一个示例: http://fstoke.me/jquery/window/我正在寻找,只是我认为不可能仅使用效果即可.
Just as the title states, is there a jQuery plugin effect that will allow me to hide divs in a way that loos like how Windows does it? So the div would move, shrink, and become transparent to a certain point on the screen. Here is an example: http://fstoke.me/jquery/window/ This is pretty much what I'm looking for except I don't think it's possible to JUST use the effect.
推荐答案
您可以使用jQuery的.animate()
方法.您需要更改的效果是:
You can use jQuery's .animate()
method. What you need for the effect is to change is:
- 窗口的宽度
- 窗户的高度
- 最高排名
- 左位置
像这样:
$('#element').animate({
top: $(window).height(), // to force the window to minimize at the bottom corner
left: 0,
width: '20px',
height: 0
});
这是我刚才制作的带有jQueryUI对话框的jsFiddle示例.而且这没有jQueryUI.
Here is a jsFiddle example with jQueryUI dialog that I've just made. And this is without jQueryUI.
如果您愿意,还可以添加透明度. opacity: 0.3
edit: You can also add transparency if you like to e.g. opacity: 0.3
这篇关于是否有一个不错的jQuery插件来实现隐藏效果,就像将Windows中的窗口最小化一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!