Bonjour à tous,
J'utilise ce code pour faire s'afficher une image en background aléatoire :Savez-vous comment je peux y ajouter l'attribut :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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]+'">')Merci infiniment pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part background-attachment : fixed;
PierreR75
Partager