CSS background origin Property
CSS background-origin Property
The background-origin property is used to specify the origin position of a background image. It has no effect on the background-attachement property.
Default Value:-
Its default value is padding-box.
Syntax:-
Its syntax is:- background-origin: padding-box | border-box | content-box | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
padding-box | The background image starts from the upper left corner of the padding edge |
border-box | The background image starts from the upper left corner of the border |
content-box | The background image starts from the upper left corner of the content |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |