background-position-y

Specifically controls the vertical (top-to-bottom) position of a background image. It allows you to adjust the vertical alignment specifically, which is perfect for shifting backgrounds on scroll.

Quick example

.hero {
  background-image: url('mountain.jpg');
  /* Pins the background to the bottom of the element */
  background-position-y: bottom;
}

Quick facts

Initial value
0%
Inherited
No
Applies to
all elements
Animation type
repeatableList

Values

centertopbottomy-starty-end

background-position-y Browser Support

Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

Safe to use without fallbacks.

1+
49+
1+
12+
ESC