CSS border-image-slice 속성
예시
테두리 이미지를 슬라이스하는 방법을 지정합니다.
#borderimg {
border-image-slice: 30%;
}
정의 및 사용
속성 은 border-image-source 로border-image-slice
지정된 이미지를 슬라이스하는 방법을 지정합니다
. 이미지는 항상 4개의 모서리, 4개의 모서리 및 중간의 9개 섹션으로 슬라이스됩니다.
채우기 키워드가 설정되지 않는 한 "중간" 부분은 완전히 투명한 것으로 처리됩니다.
팁: 또한 border-image 속성(모든 border-image-* 속성을 설정하기 위한 약식 속성)을 살펴보십시오.
기본값: | 100% |
---|---|
상속: | 아니요 |
애니메이션 가능: | 아니요. 애니메이션 가능 에 대해 읽기 |
버전: | CSS3 |
자바스크립트 구문: | 개체 .style.borderImageSlice="30%" |
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
border-image-slice | 15.0 | 11.0 | 15.0 | 6.0 | 15.0 |
CSS 구문
border-image-slice: number|%|fill|initial|inherit;
참고: 속성 은 border-image-slice
1~4개의 값을 가질 수 있습니다. 네 번째 값이 생략되면 두 번째 값과 동일합니다. 세 번째도 생략하면 첫 번째와 동일합니다. 두 번째 항목도 생략하면 첫 번째 항목과 동일합니다.
속성 값
Value | Description | Play it |
---|---|---|
number | The number(s) represent pixels for raster images or coordinates for vector images | |
% | Percentages are relative to the height or width of the image | |
fill | Causes the middle part of the image to be displayed | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS 테두리 이미지
CSS 참조: border-image 속성
CSS 참조: border-image-outset 속성
CSS 참조: border-image-repeat 속성
CSS 참조: border-image-source 속성
CSS 참조: border-image-width 속성
HTML DOM 참조: borderImageSlice 속성