> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# background-origin

APISummary
## Introduction

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

## Examples

**This is an example below: css-api**

**Entry:** `src/background-origin`
**Bundle:** `dist/background-origin.lynx.bundle`

```tsx
import { root } from "@lynx-js/react";
import "./index.scss";

const BackgroundOrigin = () => {
  const fixedAreaStyle = {
    width: "100%",
    height: "100%",
    flexDirection: "column" as const,
  };

  const containerStyles = {
    style1: {
      backgroundOrigin: "content-box" as const,
    },
    style2: {
      backgroundOrigin: "padding-box" as const,
    },
    style3: {
      backgroundOrigin: "border-box" as const,
    },
    style4: {
      backgroundOrigin: "content-box,border-box" as const,
    },
  };

  return (
    <scroll-view className="root" scroll-orientation="vertical">
      <view className="fixed_area" style={fixedAreaStyle}>
        <view className="container image1" style={containerStyles.style1}></view>
        <view className="container image1" style={containerStyles.style2}></view>
        <view className="container image1" style={containerStyles.style3}></view>
        <view className="container image2" style={containerStyles.style4}></view>
      </view>
    </scroll-view>
  );
};

root.render(<BackgroundOrigin />);

```

v0.11.0



## Syntax

```css
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 value | padding-box |
| Applies to | all elements |
| Inherited | no |
| Animatable | no |


## Formal Syntax

```
border-box | padding-box | content-box
```

## Differences from the Web

- Not support `inherit`.

## Compatibility

**Compatibility Table**

**Query:** `css.properties.background-origin`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/100-background-origin.json) · [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| background-origin | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`background-origin`**

**Specifications:**

