| background-attachment | scroll; fixed; inherit; | Fixe une image d'arrière plan insérée avec background color. Celle-ci ne défile plus |
| background-color | rgb(0,255,0); #0056ff; blue; transparent; inherit; | |
| background-image | URL; none; inherit; | Affiche une image répétée en damier à partir du coin haut gauche ex: background-image: url(dossier/fond.jpg); où background-image: url(http://www.monsite.fr/image/fond.gif); |
| background-position | 50%; 50px; 10em; top; center; bottom; left; right; inherit; | Positionne une image d'arrière plan définie avec background-position |
| background-repeat | repeat; repeat-x; repeat-y; no-repeat; inherit; | Est utilisé pour limiter la répétition de l'image et ainsi la contrôler |
Exemple avec background:
Codage CSS de l'exemple:
div#global {
width: 300px;
height: 200px;
/* fond de couleur jaune */
background-color: yellow;
/* incrustation d'une image */
background-image: url(image/fond.jpg);
/* l'image n'est pas répétée avec l'instruction no-repeat */
background-repeat: no-repeat;
/* l'image est positionnée en haut à droite */
background-position: right top;
}
| Code HTML pour afficher le style CSS
<html> |