Development

[study] 헷갈리는 flex

mefd 2023. 10. 3. 02:26
728x90

## flex

flexDirection - 화면의 방향(좌-우:row/위-아래:column)
 
justifyContent/alignItems- 내부 컨텐츠의 방향, 서로 적용되는 부분이 반대다
 
## flexDirection 에따라 justifyContent/alignItems의 위치가 바뀔 수 있다
(예)
flexDirection: "column",
 justifyContent: "flex-end",  //컨텐츠는 아래 위치 (사진 속 red)

flexDirection: "row",
justifyContent: "flex-end",  //컨텐츠는 오른쪽에 위치 (사진 속 orange)
-------------------------------------
flexDirection: "column",
 alignItems: "flex-end",  //컨텐츠는 오른쪽에 위치

flexDirection: "row",
alignItems: "flex-end",  //컨텐츠는 아래 위치

728x90

'Development' 카테고리의 다른 글

[study] iterm2 기본 터미널로 세팅하기  (0) 2024.02.02
[study] git repository-branch 만들고, 원격저장하기  (0) 2024.01.03
[react] 1. 도구 설치  (1) 2023.10.02
[PHP] xampp 설치  (0) 2023.03.09
[react] 동영상 삽입하기  (0) 2023.02.21