deveq 블로그
alignItems, alignSelf 본문
728x90
alignItems
flexDirection의 수직방향으로 자식을 정렬하는 style속성
stretch(default), flex-start, flex-end, center, baseline
flexDirection이 column일 때 기준
stretch : 자식의 width가 지정되어있지 않을 경우 자식의 width가 100%
flex-start : 앞에 정렬
flex-end : 끝에 정렬
center : 화면 중앙 정령
baseline : ???
alignSelf
자식에 적용. 해당 속성이 적용된 자식만 다른 align이됨
auto(default), stretch, flex-start, flex-end, center, baseline
auto : 부모 컴포넌트에서 지정된 alignItems 속성을 그대로 따라감
stretch : width값을 지정하지 않았을 경우 부모창을 가득 채움
flex-start : 앞에 정렬
flex-end : 끝에 정렬
center : 화면 중앙 정렬
baseline :???
'개발 > ReactNative' 카테고리의 다른 글
픽셀, 포인트, DP (0) | 2021.07.11 |
---|---|
StyleSheet 활용 toggle theme (0) | 2021.07.10 |
React Native ] Android 네이티브 모듈 만들기 (0) | 2021.06.21 |
React Native ] iOS 네이티브 모듈 만들기 (0) | 2021.06.21 |
5주차] Modal / Pressable / RefreshControl (0) | 2021.06.04 |