[CSS] 배경(background)


[CSS] 배경(background)

1. background-color 배경의 색상을 지정합니다. 색상 이름 rgba hex div { width: 100px; height: 100px; margin: 10px; } div:nth-of-type(1) { background-color: coral; } div:nth-of-type(2) { background-color: rgba(255, 127, 81); } div:nth-of-type(3) { background-color: #FF7F51; } <body> <div></div> <div></div> <div></div> </body> 2. background-image 배경의 이미지를 지정합니다. url("이미지 경로") div { width: 300px; height: 300px; background-image: url("snow.jpg"); } <body> <div></div> </body> 3. background-repeat 배경 이미지의 반복과 반복 방향을 ...


#background #css

원문링크 : [CSS] 배경(background)