Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    caricare prima la pagina e poi le immagini

    sto elaborando il mio primo sito.. e vorrei sapere se e come posso fare a far caricare dal browser prima il testo e poi le immagini.. visto che devo fare una pagina con molte immagini e con le descrizioni non vorrei far aspettare troppo l' utente.. vi ringrazio per l' aiuto..

  2. #2
    basta mettere le immagini come background nel css e non come img nel codice

    ad esempio, questo:

    codice:
    <html>
    <head>
    </head>
    <body>
    [img]immagini/immagine1.jpg[/img]
    </body>
    diventa questo:

    codice:
    <html>
    <head>
       <style type="text/css">
          #img1 {
             background: url(immagini/immagine1.jpg) no-repeat;
             width: 100px;
             height: 100px;
             }
       </style>
    </head>
    <body>
    <span id="img1"></span>
    </body>
    </html>
    Sotto la panza la mazza avanza.

  3. #3
    Originariamente inviato da Caleb
    basta mettere le immagini come background nel css e non come img nel codice

    ad esempio, questo:

    codice:
    <html>
    <head>
    </head>
    <body>
    [img]immagini/immagine1.jpg[/img]
    </body>
    diventa questo:

    codice:
    <html>
    <head>
       <style type="text/css">
          #img1 {
             background: url(immagini/immagine1.jpg) no-repeat;
             width: 100px;
             height: 100px;
             }
       </style>
    </head>
    <body>
    <span id="img1"></span>
    </body>
    </html>
    ATTENZIONE:
    nel CSS devi mettere solo le immagini che non fanno parte dei contenuti e che compongono il layout (la grafica del sito).
    è semanticamente errato fare diversamente!

  4. #4
    I know... ma alternative temo non ce ne siano
    Sotto la panza la mazza avanza.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.