documentation css background-attachment

Vous êtes ici: Les articles techniques » documentation » Cascading Style Sheets : L'ensemble des propriétés CSS » background-attachment

background-attachment

Version CSS : 1

  • S’applique à : Tous les éléments.
  • Valeur héritée : non
  • Valeur par défaut : scroll

Compatibilité

Navigateur IE 6 IE 7 Firefox 1.5 Firefox 2 Opera 8.5 Opera 9 Konqueror 3.5 Safari 2
background-attachment Partiel Partiel Oui Oui Partiel Partiel Oui Oui
scroll Partiel Partiel Oui Oui Oui Oui Oui Oui
fixed Partiel Oui Oui Oui Oui Oui Oui Oui
inherit Non Non Oui Oui Oui Oui Non Oui

Explications

Permet de figer une image d’arrière plan, insérée à l’aide de background-image, pour que celle-ci ne défile pas avec le contenu de l’élément auquel elle est appliquée.

Exemple de script

.bgfixed {
  background-attachment: fixed;
}
 
.bgscroll {
  background-attachment: scroll;
}



veille
inscrits inscrits ! Compensation à la rédaction
  • Inscription au wiki
  • Connexion

vod