Allegato di sfondo CSS
Allegato CSS in background
La background-attachment
proprietà specifica se l'immagine di sfondo deve scorrere o essere fissata (non scorrerà con il resto della pagina):
Esempio
Specificare che l'immagine di sfondo deve essere fissata:
body
{
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
}
Esempio
Specifica che l'immagine di sfondo deve scorrere con il resto della pagina:
body
{
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: scroll;
}