Alla fine ho fatto così..........
window.onload = function() {
sfondo() }
function sfondo() {
var cl = document.getElementById('main1');
if (cl.className == "") {
cl.className = "in"; }
else if (cl.className == "in") {
cl.className = "in1"; }
else if (cl.className == "in1") {
cl.className = "in2"; }
else if (cl.className == "in2") {
cl.className = "in3"; }
else if (cl.className == "in3") {
cl.className = "in4"; }
else if (cl.className == "in4") {
cl.className = "in5"; }
else { cl.className = "in"}
}
x = window.setInterval("sfondo()", 5000);
.in1
{
width: 100%;
background: url(images/sitebg1.jpg) no-repeat bottom left fixed;
con foglio di stile formatato:
.in1
{
width: 100%;
background: url(images/sitebg1.jpg) no-repeat bottom left fixed;
}
.in2
{
width: 100%;
background: url(images/sitebg2.jpg) no-repeat bottom left fixed;
}
.in3
{
width: 100%;
background: url(images/sitebg3.jpg) no-repeat bottom left fixed;
ecc...
Adesso vorrei mettere un'interpolazione tra le due foto, non so per esempio un effetto dissolvenza, un bagliore,.... insomma un effetto carino per non fare in modo che il cambio di immagine sia brusco......
Come posso fare ???
Cosa devo usare per farlo ??