Okay, I have two different background .jpgs that I want to used as the backgroud depending on what time of day it is. I want the sunny background from 7am to 8pm and the nig
I have two different background .jpgs that I want to used as the backgroud depending on what time of day it is.
I've written a more complete solution to this that can not only swap out an image for a night or day version, but select from pools of many images corresponding to all times of day.
It uses php for the sun data at your given coordinates and pure css to do the animations (no javascript).
for a demo see here:
http://shawnfromportland.com/circadianCssWithPhp/
for the source check it out here:
https://github.com/shawnfromportland/circadianCssWithPhp