I'm not a programmer, but I'm capable of modifying scripts due to some basic programming skills.
I've got my CSS (only needs to work for up-to-date browsers):
html {
background: url(bg/random.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
What I want to do is the following:
- Read out all images in the "bg" directory.
- Display a random image from that directory as background image.
Doing this for every time you reload the page is easy and I've already managed to do that. But here comes the tricky part:
- The random background image shall change everytime after the mouse has moved a distance of (let's say) 50px.
- Ideally the image should change with a quick transition of like 100ms.
Basically high performance isn't an issue. But the smoother it works the better. I'd be very happy about a bit of help. Doesn't matter if it's PHP, JS, jQuery or whatever.