Log in

View Full Version : animate background images



dothemath
07-18-2009, 07:44 PM
I would like my background image to be changed every few seconds, with a nice fade.
How do I accomplish this? Thanks!

vwphillips
07-19-2009, 03:00 PM
changing the background image is not a problem

animation of left and top can be achieved by changing the packground position

but cant think of a way of changing the opacity without changing the opacity of the element or using nested elements as the background.

dothemath
07-20-2009, 07:06 AM
I think I wasn't clear enough... sorry for that.
I would like my background image to be changed every few seconds, with a nice fade (not move).

vwphillips
07-20-2009, 10:12 AM
changing the background image is not a problem

animation of left and top can be achieved by changing the packground position

but cant think of a way of changing the opacity without changing the opacity of the element or using nested elements as the background.

= cant be done

dothemath
07-20-2009, 11:45 AM
= cant be done
I got the following massage in another forum:

setInterval in Javascript, with opacity and background-image in CSS
Does it helps? :confused:

vwphillips
07-20-2009, 01:15 PM
ask them to do it, if they do, please let me know

dothemath
07-21-2009, 12:47 PM
I have found a script that rotates backround images in a div:
Rotate Background Image in Div (http://www.blogfodder.co.uk/post/2008/01/JavaScript-CSS-Random-Background-Image.aspx)

I'm looking for the following improvements:

When one image rotates it will stay untill the new image is fully displayed. :eek:
A nice fade between the images will be nice... :D


Thanks!

vwphillips
07-21-2009, 04:39 PM
see post #4