Come posso settare uno sfondo in base alla risoluzione dell'utente? :tongue:
Come posso settare uno sfondo in base alla risoluzione dell'utente? :tongue:
somewhere in nowhere.
Vai a leggere dentro screen.width la larghezza dello schermo, e poi usi
document.getElementById("pagina").style.background Color="#FFFFF" per impostare il colore del <BODY ID="pagina">...
Ciao!
"Le uniche cose che sbagli sono quelle che non provi a fare."
Atipica
Potresti farmi un piccolo esempio?
Grazie mille![]()
![]()
![]()
somewhere in nowhere.
codice:<body id="pagina" onload="setta();"> <script type="text/javascript"> <!-- function setta() { if screen.width="800" { document.getElementById("pagina").style.backgroundColor="#FFFFF" ; } else { document.getElementById("pagina").style.backgroundColor="#FFFFF" ; } } --> </script>
"Le uniche cose che sbagli sono quelle che non provi a fare."
Atipica