CSS 플렉스 기반 속성
예시
두 번째 플렉스 항목의 초기 길이를 100픽셀로 설정합니다.
div:nth-of-type(2) {
flex-basis:
100px;
}
정의 및 사용
flex-basis
속성은 유연한 항목의 초기 길이를 지정합니다 .
참고: 요소가 유연한 항목이 아닌 경우 flex-basis
속성이 적용되지 않습니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
-webkit- 또는 -moz- 뒤에 오는 숫자는 접두사와 함께 작동한 첫 번째 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
flex-basis | 29.0 21.0 -webkit- |
11.0 | 28.0 18.0 -moz- |
9.0 6.1 -webkit- |
17.0 |
CSS 구문
flex-basis: number|auto|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
number | A length unit, or percentage, specifying the initial length of the flexible item(s) | |
auto | Default value. The length is equal to the length of the flexible item. If the item has no length specified, the length will be according to its content | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS Flexible Box
CSS 참조: flex 속성
CSS 참조: flex-direction 속성
CSS 참조: flex-flow 속성
CSS 참조: flex-grow 속성
CSS 참조: flex-shrink 속성
CSS 참조: flex-wrap 속성
HTML DOM 참조: flexBasis 속성