The background-origin property specifies the reference box used for background-position and the painting area of the background image. It applies only when a background image is present. With multiple comma-separated layers, a value may be given per layer..box {
background-origin: content-box;
}.layered {
background-image: url('a.png'), url('b.png');
background-origin: border-box, content-box;
background-position: top left, center;
}border-boxThe positioning area begins at the outer border edge.padding-boxThe positioning area begins at the outer padding edge (default).content-boxThe positioning area begins at the content-area edge.CSS Backgrounds Module Level 4First Public Working DraftW3CMDNCSSShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationsourcesvisual demonstrationpreviousnext