CSS background-repeat-y Property
The background-repeat-y property sets how background images repeat vertically. It is non-standard: use background-repeat.
Description
The background-repeat-y property sets how background images are repeated along the vertical axis only, leaving the x axis unchanged. It is a longhand of background-repeat defined in CSS Backgrounds Level 4, so that one axis can be changed without restating the other, for example in a media query.
It accepts the single-axis values of background-repeat: repeat, no-repeat, space and round, with a comma-separated list for multiple background layers. Browser support is incomplete: Firefox does not support it, and Safari supports it only partially, so in production set both axes with the background-repeat shorthand instead (for example background-repeat: repeat no-repeat).
Definition
- Initial value
- repeat
- Applies to
- all elements
- Inherited
- no
- Computed value
- as specified
- Animatable
- discrete
- JavaScript syntax
- object.style.backgroundRepeatY
Syntax
background-repeat-y: [ repeat | no-repeat | space | round ]#;
Values
- repeatThe default. The image is repeated as often as needed along this axis; the last image may be clipped.
- no-repeatThe image is not repeated along this axis.
- spaceThe image is repeated as often as it fits without clipping; extra space is distributed between the images.
- roundThe image is repeated as often as it fits and scaled so that a whole number of images fills the area.
- initialSets the property to its initial value.
- inheritTakes the computed value of the parent element.
Example
Browser Support
The following information will show you the current browser support for the CSS background-repeat-y property. Hover over a browser icon to see the version that first introduced support for this CSS property.
Desktop





Tablets & Mobile





