<div>
    <span>CONTENT</span>
</div>
div {
    aspect-ratio: 1.5;
    border: 10px dashed yellowgreen; /* border의 가장자리까지의 영역이 border-box */
    padding: 30px; /* padding의 가장자리까지의 영역이 padding-box
                      padding의 안쪽 영역이 content-box */
    background: #f2f2f2 url("earth.jpg") no-repeat;
    background-origin: padding-box; /* 초깃값 */
}
div span { /* content-box 스타일링 */
    color: white;
    background-color: blue;
    display: block;
}
데모 적용해 보기: background-origin 데모 버튼을 클릭해 보세요!
selector {
    background-origin: border-box | padding-box | content-box
}
box model
요소 박스의 Box model
/* 키워드 값 */
background-origin: border-box;
background-origin: padding-box;
background-origin: content-box;

/* 글로벌 값 */
background-origin: inherit;
background-origin: initial;
background-origin: revert;
background-origin: revert-layer;
background-origin: unset;
<div class="box">코딩에브리바디</div>
.box {
    color: #fff;
    background-image: linear-gradient(
                        to right,
                        rgba(255, 0, 0, 0.5),
                        rgba(0, 0, 255, 0.5),
                        rgba(0, 128, 0, 0.5)
                      ),
                      radial-gradient(circle, gold, silver);
    border: 15px dashed yellowgreen;
    padding: 15px;
    background-origin: padding-box, content-box;
    background-repeat: no-repeat;
}
실제 적용 모습