Background-origin property

Category: Web Development & Approved by devanshchakravarti83@gmail.com On January-26-2021 14:18:52

Background Origin Property



The background-origin property is used to set the origin of background. This property values are border-box, content-box, and padding-box,

The syntax for background-origin property is:
background-origin: <box> value;

Values description:

  • border-box
    The background is positioned relative to the border box. Background will start from border.

  • padding-box
    The background is positioned relative to the padding box. Background will start from inside the border.

  • content-box
    The background is positioned relative to the content box. Background will start from inside the padding.



Let see a syntax for all values of background-origin property.
Example:
“Global value”
background-origin: intital;
background-origin: inherit;
background-origin: unset;
“Keyword Value”
background-origin: border-box;
background-origin: padding;
background-origin: content-box;

Code Example:


We have made blog on CSS tutorial from basic, if you haven’t read them so Click Here


Comments

Share your thoughts about this post
web counter