background-repeat
Sets or retrieves how the background-image property of the object is tiled.
sRepeat
String that specifies or receives one of the following values:
repeat | Default. Image is repeated horizontally and vertically. |
no-repeat | Image is not repeated. |
repeat-x | Image is repeated horizontally. |
repeat-y | Image is repeated vertically. |
This property has a default value of repeat. It is not inherited.
The following example uses the background-repeat property to specify whether the background image is tiled. This example uses a call to an embedded (global) style sheet to tile the image:
<style>
.style1 {background-image: url(sphere.jpg);
background-repeat: repeat}
.style2 {background-image: url(sphere.jpeg);
background-repeat: no-repeat; }
</style>
</head>
<body>
<span onmouseover="this.className='style1'"
onmouseout="this.className='style2'"
onclick="this.className=''">
. . .
</span>
This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1).
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, DEFAULTS, DFN, DIV, DL, DT, EM, FIELDSET, FORM, HN, HTML, I, IMG, INPUT TYPE=BUTTON, INPUT TYPE=CHECKBOX, INPUT TYPE=FILE, INPUT TYPE=IMAGE, INPUT TYPE=PASSWORD, INPUT TYPE=RADIO, INPUT TYPE=RESET, INPUT TYPE=SUBMIT, INPUT TYPE=TEXT, LI, OL, P, S, SPAN, SUB, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP