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 object position Property

CSS object-position Property

 

 

The object-position property is used in combination with object-fit to specify how an img element or video element should be positioned with x/y coordinates inside its own content box.

 

Default Value:-

 

Its default value is 50% 50%.

 

Syntax:-

 

Its syntax is:- object-position: position | initial | inherit;

 

Further Explanation:-

 

Value Description
position Specifies the position of the image or video inside its content box. First value controls the x-axis and the second value controls the y-axis.
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