요약
background속성은 style sheet에서 한 구역의 배경 속성값을 설정하기 위한 속성이다. background은 다음 중 하나 혹은 여러개의 값을 설정하는데 사용될 수 있다. : background-attachment, background-color, background-image, background-position, background-repeat.
- Initial value: see individual properties for details
- Applies to: all elements
- Inherited: no
- Percentages: allowed on
background-position - Media: visual
- Computed value: see individual properties
Syntax
background: [background-color || background-image ||
background-repeat || background-attachment ||
background-position] | inherit]
Values
- background-color
- See
background-color. - background-image
- See
background-image. - background-repeat
- See
background-repeat. - background-attachment
- See
background-attachment. - background-position
- See
background-position.
예제
body {
background: red;
}
.topbanner {
background: url("topbanner.png") #00D repeat fixed;
}
Notes
유효한 선언을 해라. background 속성은 먼저 초기값으로 설정한다. 그리고나서, 선언 안의 구체적인 값으로 설정한다. 각각의 속성 하나하나의 값을 설정하지말고, 단지 기본 초기값을 바꿔라.
Specifications
Browser 호환성
| Browser | 지원가능한 최소 버전 |
|---|---|
| Internet Explorer | 4 |
| Firefox | 1 |
| Netscape | 6 |
| Opera | 3.5 |
See Also
background, background-attachment, background-color, background-image, background-position, background-repeat
Categorias
Interwiki Language Links

