CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS background position Property

CSS background-position Property

 

 

The background-position property is used to set the starting position of a background image. A background-image is placed at the top-left corner of an element and repeats both vertically and horizontally direction by default.

 

Default Value:-

 

Its default value is 0% 0%.

 

Syntax:-

 

Its syntax is:- background-position: value;

 

Further Explanation:-

 

Value Description
right top
right center
right bottom
center top
center center
center bottom
left top
left center
left bottom
Show in these relative positions.
x% y% The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%.
xpos ypos The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS