Anglais [?b?kgra?nd] US [?b?k?ɡra?nd]

n (peinture, etc.) couleur d'arrière-plan?; bande sonore

pluriel?: arrière-plans

propriété d'arrière-plan javascript syntaxe

Fonction?: Définissez toutes les propriétés de l'arrière-plan.

Syntaxe?: Object.style.background=background-color background-image, background-repeat, background-attachment, background-position

Paramètres?: background-color Définit la couleur d'arrière-plan de l'élément. background-image Définit l'image d'arrière-plan. background-repeat Définit si et comment l'image d'arrière-plan se répète. background-attachment Indique si l'image d'arrière-plan est fixe ou défile avec le reste de la page. background-position définit la position de départ de l'image d'arrière-plan.

propriété d'arrière-plan javascript exemple

<html>
<head>
<script type="text/javascript">
function setStyle()
{
document.body.style.background="#FFCC80 url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) repeat-y";
}
</script>
</head>
<body>

<input type="button" onclick="setStyle()"
value="Set background style" />

</body>
</html>

Exécuter l'instance ?

Cliquez sur le bouton ??Exécuter l'instance?? pour afficher l'instance en ligne