Style backgroundOrigin Property
Style backgroundOrigin Property
The backgroundOrigin property is used to either set or return what the background-position property is relative to. If background-attachment is set to fixed then this property will not work.
Syntax:-
Its syntax is:- object.style.backgroundOrigin OR object.style.backgroundOrigin = padding-box|border-box|content-box|initial|inherit
Return:-
Its return is:- string having background-origin property of an element
Further Explanation:-
Value | Description |
---|---|
padding-box | The background image is positioned relative to padding-box |
border-box | The background image is positioned relative to border-box |
content-box | The background image is positioned relative to content-box |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |