Dim. 01 Oct. 2006, 19:40
0 | 0 | ||
h2o a écrit :je dit une connerie, j'avais pas vu ton code.
Tu peux tenter qq chose comme ça:
Code :function aff_fond()
{
if (screen.width<800) {document.write('<body style="background-image:url('640.jpg')";}
if (screen.width==800) {document.write('<body style="background-image:url('800.jpg')";}
if (screen.width==1024) {document.write('<body style="background-image:url('1024.jpg')";}
if (screen.width==1152) {document.write('<body style="background-image:url('1152.jpg')";}
if (screen.width>1152) {document.write('<body style="background-image:url('1600.jpg')";}
}
putain c'est chiant, l'affichage decone avec ce code.
A la place des document.write, tu peux utiliser :
Code :
document.getElementById(body).style.backgroundImage=sphere.jpg
"Du Fais tard à l'Yon, c'est bon, mangez-en"