fade

Pure JavaScript fade in function

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Hi friends i want to fade in a div when i click on another div and for that i am using following code. Code1 works fine but i require to use the Code2 . I know there is jQuery but i require to do this in JavaScript Can you guide me that what kind of mistake i am doing or what i need change... Code1 --- Works Fine function starter () { fin (); } function fin () { for ( i = 0 ; i <= 1 ; i += 0.01 ) { i = Math . round ( i * 100 )/ 100 ; setTimeout ( "seto(" + i + ")" , i * 1000 ); } } function seto ( opa ) { var ele = document .

iOS SDWebImage fade in new image

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been using SDWebImage on my iPhone app to handle all of the image loading. I am using a placeholder image, and I want to crossfade or fade in the new image once it loads. I am using a success block to set the image, and it is working great. No matter what I try, the image will not fade in though. I've tried sending the animation code back to the main thread, but that didn't help either. It just loads instantly... No animation. Here is my code. Any thoughts? // load placeholder image NSURL *url = ... _imageView = [[UIImageView alloc]

Toggle CSS3 fade?

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Is it possible to use jQuery to toggle the opacity of an element (so that you can fade it in/out by the means of -webkit-transition:opacity .5s linear; ) and then change the display to display:block if the element is shown, or display:none if the element is hidden? For example: You click on an <a> tag, which shows a div by means of setting it's opacity to 1 and setting display:block . Then you click the <a> tag again, and it sets the opacity to 0 and then sets the display to none . My attempt at this is below: . visible { opacity :

How to add fade/fade out effects to a JLabel

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hello I am trying to create a Java game and need to add some effects to my label. I have the following questions How to add fade in/ fade out effects to my label . I have a JLabel but I need a shape for it, possibly a rectangle or a cloud shape . How can I get that done ? 回答1: You can use a AlphaComposite to change the opactiy level of a component... Now, with a little clever use of a timer, you can make the label fade in and out or simply control the opacity as you please... public class TestFadeLabel { public static void main(String[] args

jQuery fade to new image

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I fade one image into another with jquery? As far as I can tell you would use fadeOut, change the source with attr() and then fadeIn again. But this doesn't seem to work in order. I don't want to use a plugin because I expect to add quite a few alterations. Thanks. 回答1: In the simplest case, you'll need to use a callback on the call to fadeOut() . Assuming an image tag already on the page: <img id="image" src="http://sstatic.net/so/img/logo.png" /> You pass a function as the callback argument to fadeOut() that resets the src

How to make Qt widgets fade in or fade out?

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to fade in and fade out a QLabel or for that matter any QWidget subclass. I have tried with QGraphicsEffect , but unfortunately it works well only on Windows and not on Mac. The only other solution which can work on both Mac & Windows seems to be having my own custom paintEvent where I set the opacity of QPainter and also define a Q_PROPERTY for "opacity" in my derived QLabel and change the opacity through QPropertyAnimation . I am pasting below the relevant code snippet for your reference. I still see an issue here - reusing the

Fade in background color using jQuery?

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to take a div and have the background fade to white on mouseenter and fade back out to black on mouseout. Any ideas on how to do this in jQuery? 回答1: with JQuery .hover() $("div" ).hover( function() { $(this).animate({backgroundColor: "#fff"}, 'slow'); }, function() { $(this).animate({backgroundColor:"#000"},'slow'); }); with JQuery .mouseover() $("div") .mouseover(function() { $(this).animate({backgroundColor: "#fff"}, 'slow'); }) .mouseout(function() { $(this).animate({backgroundColor:"#000"},'slow'); }); Note you have to use

Fade image to transparent like a gradient

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to have an image (a background image) to fade to transparent so that content behind it can actually be seen (barely, thanks to transparency). I can achieve it obviously with a PNG image, but I need to ask to my graphic designer to change the image every time I want to change the start => stop transparency points (maybe I want more color or maybe I want less color and more transparency). Are there any chance I can achieve the same effect with CSS3? I tried applying a gradient to transparent on a jpg (and a png) but I can't see

CSS3 Transition - Fade out effect

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to implement the "fade out" effect in pure css. Here is the fiddle I did look into a couple of solutions online. However after reading the documentation online I am trying to figure out why the slide animation would not work. Any pointers ? Here is the HTML Saved The CSS . dummy - wrap { animation : slideup 2s ; - moz - animation : slideup 2s ; - webkit - animation : slideup 2s ; - o - animation : slideup 2s ; } . success - wrap { width : 75px ; min - height : 20px ; clear : both ; margin - top : 10px ; } . successfully

How do I do a Fade/No transition between view controllers

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to do a fade in and fade out transition between View Controllers in Storyboard. Or without transition. If it's possible, what's the code for it? 回答1: If presenting a modal view controller, you can specify a modalTransitionStyle of UIModalTransitionStyleCrossDissolve . If doing this with a segue in your storyboard, select the attributes inspector for the segue, and specify the transition style there: If presenting the view controller programmatically, you can define your modal segue between the view controllers in your