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. |