On Sat, Nov 7, 2015 at 2:17 PM, Geoff Lankow <ge...@darktrojan.net> wrote:

> I'm displaying some quite large (6+ megapixels) images using CSS
> background-image, and sometimes want to swap one for another. If I just
> change the CSS property, there is a noticeable flicker as the first image
> is removed, then the second image is loaded and displayed. I want to avoid
> this.
>
> My current approach is to create a second element behind the first, load
> the new image in it, wait for a while, then remove the first element. This
> works okay but it's a total guess how long "a while" should be - 500ms
> seems to be a good amount on my machine with these particular images. So
> how can I detect (with privileged code if necessary) when the second image
> is ready to be displayed?
>

Use <img> elements instead?

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to