CSS 배경 클립 속성
예시
요소 내에서 배경이 확장되어야 하는 거리를 지정합니다.
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
정의 및 사용
속성 은 background-clip
요소 내에서 배경(색상 또는 이미지)이 확장되어야 하는 거리를 정의합니다.
기본값: | 테두리 상자 |
---|---|
상속: | 아니요 |
애니메이션 가능: | 아니요. 애니메이션 가능 에 대해 읽기 |
버전: | CSS3 |
자바스크립트 구문: | 개체 .style.backgroundClip="콘텐츠 상자" |
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
CSS 구문
background-clip: border-box|padding-box|content-box|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
border-box | Default value. The background extends behind the border | |
padding-box | The background extends to the inside edge of the border | |
content-box | The background extends to the edge of the content box | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS 배경
HTML DOM 참조: backgroundClip 속성