Jul 18, 2025
This lecture explains the CSS background-repeat property, detailing how it controls the repetition of background images along horizontal and vertical axes, and describing the different available values.
background-repeat property sets how a background image is repeated horizontally and vertically.repeat-x or repeat-y.background-repeat: repeat;, background-repeat: no-repeat;, background-repeat: space round;.repeat: Image repeats both horizontally and vertically to cover the background area (default).no-repeat: Image is shown only once, and not repeated.repeat-x: Image repeats only along the horizontal axis.repeat-y: Image repeats only along the vertical axis.space: Images are repeated without clipping, with even spaces between them.round: Images are repeated and stretched to fill the area without gaps, which may distort the image.repeat-x is equivalent to repeat no-repeat.repeat-y is equivalent to no-repeat repeat.repeat-x or repeat-y) applies to both axes.repeat repeat.space, images are spaced apart evenly, but there may be empty areas if the area is not a multiple of the image size.round, images are proportionally stretched to fill available space, which can distort aspect ratios.repeat.::first-letter and ::first-line pseudo-elements.background-repeat values in CSS and observe the effects.background-position and background-size for complete background image control.