background-repeat: ***;

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O

The background-repeat property specifies how a background image is repeated.

Applying this property to the BODY element applies the specified style to background of an entire page.


body {
background-image: url(image/back.gif);
background-repeat: repeat-y;
}

Property Value Explanation
background-repeat repeat the image is repeated both horizontally and vertically (default)
repeat-x the image is only repeated horizontally
repeat-y the image is only repeated vertically
no-repeat the image is displayed only once

Example

repeat-y (The image is only repeated vertically)

<html>
<head>
<title>TAG index</title>

<style type="text/css">

body {
background-color: #ffffff;
background-image: url(image/back.gif);
background-repeat: repeat-y;
color: #000000;
}

</style>

</head>
<body>



</body>
</html>

Output
Background Image back.gif
Example pagenew window
Other examples
Output

repeat-x examplenew window (The image is only repeated horizontally)

no-repeat examplenew window (The image is displayed only once)

repeat examplenew window (The image is repeated both horizontally and vertically)