<div class="container">
<p>The following image <img src="http://tympanus.net/codrops-playground/assets/images/cssref/properties/background-repeat/bg.png"> is used as a background image for the following boxes.</p>
<div class="el el-1">
My background image is centered and then repeated vertically. The copies of the image at the edges are clipped off because they don't fit into my background positioning area by a whole number.
</div>
<div class="el el-2">
My background image is repeated horizontally and vertically.
</div>
<div class="el el-3">
My background image is set to <em>not</em> repeat. It is positioned at position <code>60% 70%</code> across my background using the <code>background-position</code> property.
</div>
<div class="el el-4">
I have two background images. The first image is positioned at position <code>60% 70%</code> across my background using the <code>background-position</code> property. The second image is set to repeat horizontally, prevented from being clipped by using the <code>space</code> value, and it is set to not repeat vertically.<br/><br/> <strong style="text-decoration:underline">This example may not work in your browser.</strong>
</div>
</div>
body {
background-color: #F5F5F5;
color: #555;
font-size: 1.1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.container {
margin: 40px auto;
width: 90%;
}
.el {
height: 350px;
margin-bottom: 20px;
padding: 20px;
}
.el-1 {
background-color: #7fc379;
color: white;
background-position: center;
background-repeat: repeat-y;
background-image: url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/background-repeat/bg.png);
}
.el-2 {
background-color: #ef6e7e;
color: white;
background-position: center;
background-repeat: repeat;
/* equivalent to 'repeat repeat' */
background-image: url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/background-repeat/bg.png);
}
.el-3 {
background-color: #5776b6;
color: white;
background-position: 60% 70%;
background-repeat: no-repeat;
background-image: url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/background-repeat/bg.png);
}
.el-4 {
background-color: #f39c12;
color: white;
background-position: 60% 70%, top left;
background-repeat: no-repeat, space no-repeat;
background-image: url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/background-repeat/bg.png), url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/background-repeat/bg-2.png);
}