Search results
Learn how to set if/how a background image will be repeated with CSS background-repeat property. See examples, syntax, values, browser support and related pages.
- Background Repeat
CSS background-repeat. By default, the background-image...
- Background Repeat
- Overview
- Try it
- Syntax
- Browser compatibility
The background-repeat CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all.
By default, the repeated images are clipped to the size of the element, but they can be scaled to fit (using round) or evenly distributed from end to end (using space).
Values
The one-value syntax is a shorthand for the full two-value syntax: In the two-value syntax, the first value represents the horizontal repetition behavior and the second value represents the vertical behavior. Here is an explanation of how each option works for either direction:
BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
- no
- repeat
Learn how to use the CSS background-repeat property to control how a background image is repeated horizontally, vertically, or not at all. See examples, syntax, and tips for different values of background-repeat.
Feb 17, 2015 · Learn how to use the background-repeat property to control how a background image repeats in CSS. See the values, syntax, examples, and browser support for this property.
CSS background-repeat property is used to control the repeating behavior of the background image in an element or webpage. For example, body { background-image: url("avatar.png"); background-repeat: no-repeat; } Browser Output.
Aug 2, 2023 · Learn how to use the background-repeat property in CSS to repeat or not repeat the background image horizontally and vertically. See examples, syntax, default value, and supported browsers.
People also ask
How do I repeat a background image?
What does 'background-repeat' mean in CSS?
How do I repeat a background image horizontally and vertically?
Can a background image be repeated only vertically?
May 24, 2017 · The background-repeat CSS property defines how background images are repeated. A background image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all.