스타일 alignSelf 속성
예시
컨테이너에 맞게 유연한 요소 내부의 항목 중 하나에 대한 정렬을 설정합니다.
document.getElementById("myBlueDiv").style.alignSelf = "stretch";
정의 및 사용
alignSelf 속성은 유연한 컨테이너 내부에서 선택한 항목의 정렬을 지정합니다.
참고: alignSelf 속성은 유연한 컨테이너의 alignItems 속성을 재정의합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Webkit 뒤에 오는 숫자는 접두사와 함께 작동한 첫 번째 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
alignSelf | 21.0 | 11.0 | 20.0 | 9.0 7.0 Webkit |
12.1 |
통사론
alignSelf 속성을 반환합니다.
object.style.alignSelf
alignSelf 속성을 설정합니다.
object.style.alignSelf = "auto|stretch|center|flex-start|flex-end|baseline|initial|inherit"
속성 값
Value | Description |
---|---|
auto | Default. The element inherits its parent container's align-items property, or "stretch" if it has no parent container |
stretch | The element is positioned to fit the conatiner |
center | The element is positioned at the center of the container |
flex-start | The element is are positioned at the beginning of the container |
flex-end | The element is positioned at the end of the container |
baseline | The element is positioned at the baseline of the container |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 자동 |
---|---|
반환 값: | 요소의 align-self 속성을 나타내는 String |
CSS 버전 | CSS3 |
관련 페이지
CSS 참조: align-self 속성
HTML DOM STYLE 참조: alignContent 속성
HTML DOM STYLE 참조: alignItems 속성