开发者

foreground image fade away effect

开发者 https://www.devze.com 2023-03-22 08:37 出处:网络
On Mac OS X, there is an effect for which I would like to know the name (so that I can\'t find information about it). It is slightly transparent message that appears in the center of the screen, and t

On Mac OS X, there is an effect for which I would like to know the name (so that I can't find information about it). It is slightly transparent message that appears in the center of the screen, and then quickly fades away.

For example, with Google Chrome, selecting the option "Warn Before Quitting" and briefly typing the combo key command+Q will make it appear, as shown on the screenshot available here.

My goal is to reproduce this effect usi开发者_如何学Gong jQuery. Any ideas?

EDIT: It is the same effect as command+tab to switch application focus.


Is this something like what you want? I don't know what exactly it's called. http://jsfiddle.net/eF5hZ/1/


If you want to make it show, then fade away after a period of time, you can use the .delay() method that jquery provides.

$("#showmessage").click(function(e) {
   $("#message").show().delay(1000).fadeOut();;

});

This will show the message, then fade it out after a second.

http://jsfiddle.net/UzvWc/1/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号