
body {
background-color: lightblue;
}
h1 {
background-color: rgb(255, 128, 0);
}
p {
background-color: #FFFFCC;
}

body {
background-image: url("/examples/images/img_background_good.png");
}

/* 배경의 수평 반복 */
body {
background-image: url("/examples/images/img_man.png");
background-repeat: repeat-x;
}



background-position 속성은 반복되지 않는 배경 이미지의 상대 위치(relative position)를 설정한다.
가로 위치 값(x축)으로 left, center, right를 사용할 수 있고, 세로 위치 값(y축)으로 top, center, bottom을 사용할 수 있다.
가로 위치 값을 먼저 작성하고 세로 위치 값을 작성한다.
body {
background-image: url("/examples/images/img_man.png");
background-repeat: no-repeat;
/* right: 가로 위치, top: 세로 위치 */
background-position: right top;
}

%)나 픽셀(px)을 사용하여 상대 위치를 직접 명시할 수도 있다. 이때 상대 위치를 결정하는 기준은 해당 요소의 왼쪽 상단(left top)이 된다.body {
background-image: url("/examples/images/img_man.png");
background-repeat: no-repeat;
background-position: 100px 200px;
}
body {
background-image: url("/examples/images/img_man.png");
background-repeat: no-repeat;
background-position: left bottom;
background-attachment: fixed;
}
