--- title: background-repeat slug: Web/CSS/background-repeat tags: - CSS - CSS Referenz translation_of: Web/CSS/background-repeat ---
{{ CSSRef() }}
Die background-repeat Eigenschaft bestimmt, ob und wie Hintergrundbilder wiederholt werden.
repeatbackground-repeat: <Hintergrundwiederholung>[, <Hintergrundwiederholung>]* <Hintergrundwiederholung>: repeat | repeat-x | repeat-y | no-repeat | round | space | inherit
<ol>
<li>no-repeat
<div class="one"> </div>
</li>
<li>repeat
<div class="two"> </div>
</li>
<li>repeat-x
<div class="three"> </div>
</li>
<li>repeat-y
<div class="four"> </div>
</li>
<li>repeat-x, repeat-y (multiple images)
<div class="five"> </div>
</li>
</ol>
/* Shared for all DIVS in example */
li {margin-bottom: 12px;}
div {
background-image: url(https://mdn.mozillademos.org/files/12005/starsolid.gif);
width: 144px;
height: 84px;
}
/* background repeat CSS */
.one {
background-repeat: no-repeat;
}
.two {
background-repeat: repeat;
}
.three {
background-repeat: repeat-x;
}
.four {
background-repeat: repeat-y;
}
/* Multiple images */
.five {
background-image: url(https://mdn.mozillademos.org/files/12005/starsolid.gif),
url(https://developer.mozilla.org/static/img/favicon32.png);
background-repeat: repeat-x,
repeat-y;
height: 144px;
}
In this example, each list item is matched with a different value of background-repeat.
{{EmbedLiveSample('Beispiele', 240, 360)}}
| Browser | ab Version | mehrere Hintergrundbilder | round und space Werte |
|---|---|---|---|
| Internet Explorer | 4.0 | --- | --- |
| Firefox (Gecko) | 1.0 (1.0) | 3.6 (1.9.2) | --- |
| Opera | 3.5 | 10.5 | 10.5 |
| Safari (WebKit) | 1.0 (85) | 1.3 (312) | --- |
background, background-attachment, background-clip, background-color, background-image, background-origin, background-position, background-size-moz-background-inline-policy{{ languages( { "en": "en/CSS/background-repeat", "es": "es/CSS/background-repeat", "fr": "fr/CSS/background-repeat", "pl": "pl/CSS/background-repeat" } ) }}