스타일 flexDirection 속성
예시
<div> 요소 내에서 유연한 항목의 방향을 재정렬합니다.
document.getElementById("main").style.flexDirection = "column-reverse";
정의 및 사용
flexDirection 속성은 유연한 항목의 방향을 설정하거나 반환합니다.
참고: 요소가 유연한 항목이 아닌 경우 flexDirection 속성은 효과가 없습니다.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
flexDirection | Yes | 11.0 | Yes | 9.0 | Yes |
통사론
flexDirection 속성을 반환합니다.
object.style.flexDirection
flexDirection 속성을 설정합니다.
object.style.flexDirection = "row|row-reverse|column|column-reverse|initial|inherit"
속성 값
Value | Description |
---|---|
row | Default value. The flexible items are displayed horizontally, as a row |
row-reverse | Same as row, but in reverse order |
column | The flexible items are displayed vertically, as a column |
column-reverse | Same as column, but in reverse order |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 열 |
---|---|
반환 값: | 요소의 플렉스 방향 속성을 나타내는 문자열 |
CSS 버전 | CSS3 |
관련 페이지
CSS 참조: flex-direction 속성
HTML DOM STYLE 참조: flex 속성
HTML DOM STYLE 참조: flexBasis 속성
HTML DOM STYLE 참조: flexFlow 속성
HTML DOM STYLE 참조: flexGrow 속성
HTML DOM STYLE 참조: flexShrink 속성
HTML DOM STYLE 참조: flexWrap 속성
❮ 스타일 개체