B.8. background-repeat

By default, a background image, specified with the background-image property, will repeat horizontally and vertically to fill the element (this is often referred to as tiling). The background-repeat property lets you override that behavior with your own preferences.

Inherited: No

See also: Section B.5background-image, Section B.6background-position

B.8.1. Value

repeat, no-repeat, repeat-x, or repeat-y

The first two options are self-explanatory. repeat-x causes the image to repeat only horizontally, effectively forming a horizontal band with the background image. repeat-y causes the image to repeat only vertically, forming a vertical band.

Initial value: repeat

B.8.2. Compatibility

CSS Version: 1

Works in all CSS-compatible ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.