Comment ajouter l'attribut background-attachment : fixed; dans un script existant ?
Bonjour à tous,
J'utilise ce code pour faire s'afficher une image en background aléatoire :
Code:
1 2 3 4 5 6 7
| var image= new Array()
image[0]="images/bgHome1.jpg"
image[1]="images/bgHome2.jpg"
image[2]="images/bgHome3.jpg"
var random=Math.floor(3*Math.random());
document.write('<body background="'+image[random]+'">') |
Savez-vous comment je peux y ajouter l'attribut :
Code:
background-attachment : fixed;
Merci infiniment pour votre aide
PierreR75