Dépannage informatique à domicile NCT Micro
  Cliquez ici pour vous abonner à ce flux RSS  

background

background-attachmentscroll; fixed; inherit;Fixe une image d'arrière plan insérée avec background color. Celle-ci ne défile plus
background-colorrgb(0,255,0); #0056ff; blue; transparent; inherit;
background-imageURL; 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-position50%; 50px; 10em; top; center; bottom; left; right; inherit;Positionne une image d'arrière plan définie avec background-position
background-repeatrepeat; 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>
< head>
< style type="text/css"> @import url(style/background.css);</style>
< /head>
< body>
<div id="global"></div>
< /body>
< /html>