The CSS background-position-y property is used to set the initial vertical position for the background image i.e. it is used to set an image at a certain position in the vertical direction. The position is relative to the positioning later, which can be set by using the CSSbackground-origin property.
top: It is used to set the image at the top position.
center: It is used to set the image at the vertical center position.
bottom: It is used to set the image at the bottom position.
length: It is used to set the image’s vertical position of the given length.
percentage: It is used to set the image’s vertical position in terms of percentage height.
initial: It is used to set its default value. Its default value is 0%.
inherit: It inherits this property value from its parent elements.
Example 1: The following code demonstrates the CSS background-position-y property showing the image in the center.
Please Login to comment...