Jump to content

How to change background image with javascript


MikeatW3S

Recommended Posts

When you set the backgroundImage property, the browser checks to see if this image is stored in the cache and will try to load it from there; if the image isn't cached then it will download the image from the server.

  • Like 1
Link to comment
Share on other sites

When you set the backgroundImage property, the browser checks to see if this image is stored in the cache and will try to load it from there; if the image isn't cached then it will download the image from the server.

 

Again cool! I think I'm on my way to creating a decent website. Thanks lots

Link to comment
Share on other sites

Is there a way to have the background image fade in and out to a white plain background? Hopefully there are statements to that effect that I can employ.

 

Is there a way to anchor the background image at, say, the upper right corner of the page, no matter how the user sizes the window? I hope there is because this would make editing very easy. Thanks.

Link to comment
Share on other sites

That's sort of a hack. Instead of being an actual background image, that's 2 image elements stacked on top of each other. It changes the picture on the one below, then fades out the one on top. That's different than using an actual CSS background image.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...