CSS 데모: background-image 데모 버튼을 클릭해 보세요!
selector {
    background-image: /* value */
}
/* 키워드 값 */
background-image: none; /* 배경 이미지 없음 */

/* 한 개의 배경 이미지 */
background-image: url("bg-example.jpg"); /* 이미지 파일 */
background-image: linear-gradient(red, blue); /* 그라디언트 */

/* 여러 개의 배경 이미지(겹쳐서 사용) */
background-image: url("bg-example-1.jpg"), url("bg-example-2.jpg");
background-image: linear-gradient(red, blue), url("bg-example-1.jpg"), url("bg-example-2.jpg");

/* 글로벌 값 */
background-image: inherit;
background-image: initial;
background-image: revert;
background-image: revert-layer;
background-image: unset;
selector {
    background-image: linear-gradient(red, blue), url("bg-example-1.jpg"), url("bg-example-2.jpg");
}
<div>background-image</div>
div {
    height: 200px;
    border: 10px dashed violet;
    background-image: url("heart.png");
}
실제 적용된 모습
<div>background-image</div>
div {
    height: 200px;
    border: 10px dashed violet;
    background-image: linear-gradient(red, blue);
}
실제 적용된 모습
<div>background-image</div>
div {
    height: 200px;
    border: 10px dashed violet;
    background-image: url("heart.png"), url("pattern.jpg");
}
실제 적용된 모습
<div>background-image</div>
div {
    height: 200px;
    border: 10px dashed violet;
    background-image: linear-gradient(rgba(0, 0, 255, 0.1), rgba(255, 255, 0, 0.1)),
                      radial-gradient(green, pink);
}
실제 적용된 모습
<div>background-image</div>
div {
    height: 200px;
    border: 10px dashed violet;
    background-image: url("heart.png"),
                      linear-gradient(green, blue);
}
실제 적용된 모습
div {
    height: 200px;
    border: 10px dashed violet;
    background-image: url("heart.png"),
                      linear-gradient(green, blue);
}
실제 적용된 모습
<div>background-image</div>
div {
    height: 200px;
    border: 10px dashed violet;
    background-color: yellow;
    background-image: url("heart.png");
}
실제 적용된 모습
<div>codingEverybody</div>
div {
    font-size: 2em;
    font-weight: 900;
    text-align: center;
    padding: 30px;
    border: 10px dashed red;
    background-image: url("flower.jpg");
    background-position: center;
    background-clip: border-box; /* 초깃값 */
}
데모 적용해 보기: background-clip 데모 버튼을 클릭해 보세요!