Hintergrund - Beispiele
Ohne Attribute
Der Hintergrund dieses Dokumentes wurde mit folgender Zeile erzeugt.
<div style="background-image: url(../Pictures/flora8.jpg)">
Ohne Angabe von Attributen
Ohne Angabe von Attributen
Ohne Angabe von Attributen
Mit repeat-x
Mit dem Attribut repeat-x wird das Bild nur in x-Richtung, also horizontal wiederholt.
<div style="background-image: url(../Pictures/html.gif);background-repeat: repeat-x">
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
Mit repeat-y
Mit dem Attribut repeat-y wird das Bild nur in y-Richtung, also vertika wiederholt.
<div style="background-image: url(../Pictures/html.gif);background-repeat: repeat-y">
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
Mit no-repeat
Mit dem Attribut no-repeat wird das HIntergrundbild nicht wiederholt, also nur einmal dargestellt.
<div style="background-image: url(../Pictures/flora8.jpg);background-repeat: no-repeat">
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x
repeat-x repeat-x repeat-x