For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/background-origin.md.
Lynx
  • English
  • background-origin

    Introduction

    The background-origin CSS property sets the background's origin: from the border start, inside the border, or inside the padding.

    Examples

    Syntax

    background-origin: border-box
    background-origin: padding-box
    background-origin: content-box
    // multiple bg-origin
    background-origin: content-box, padding-box;

    Values

    • Default value padding-box
      The background is positioned relative to the border box.

    • border-box
      The background is positioned relative to the padding box.

    • content-box
      The background is positioned relative to the content box.

    Formal definition

    Initial valuepadding-box
    Applies toall elements
    Inheritedno
    Animatableno

    Formal Syntax

    border-box | padding-box | content-box

    Difference between web

    • Not support inherit.

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.