Style objectPosition Property
Style objectPosition Property
The objectPosition property is used to define how an img or video element be positioned in its own content box.
Syntax:-
Its syntax is:- object.style.objectPosition OR object.style.objectPosition = position | initial | inherit
Return:-
Its return is:- string having position of an element in its content box
Further Explanation:-
Value | Description |
---|---|
position | Specifies the position of the image or video inside its content box. The first value is the x-axis while second value is y-axis. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |