Domanda

sorry if the title isn't overly clear but i don't know how else to word it.

I have two websites and I will be looking after another one while the other wont be touched after it is released. What I want to do is get the sites background to change when the other site's background that I will be maintaining changes.

Is this possible?

Thanks

È stato utile?

Soluzione

Yes, just set the background-image url to the full path of the background image on the site that will be changing, then just make sure that any time you change the background image, you keep the filename the same and overwrite the previous background.

Set this code on the site that will be changing:

body {
background :url('/images/bg.jpg');
}

And this code on the site that won't be changing(change the URL to the absolute path of the background image from the dynamic site):

body {
background: url('http://yoursite.com/images/bg.jpg');
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top