반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- xcode
- qunit
- 오블완
- 티스토리챌린지
- 네트워크
- vsCode
- 맥
- centos
- 센토스
- react
- 개발
- IOS
- node
- unittest
- MAC
- webpack
- Android
- 리눅스
- TensorFlow
- VirtualBox
- androidstudio
- localserver
- build
- jest
- Chrome
- ReactNative
- PYTHON
- MachineLearning
- linux
Archives
- Today
- Total
로메오의 블로그
CSS flex 본문
반응형
flex 선언
.container {
display: flex
/* display: inline-flex */
}
flex 방향
.container {
flex-direction: row;
/* flex-direction: column; */
/* flex-direction: row-reverse; */
/* flex-direction: column-reverse; */
}
줄넘김
.container {
flex-wrap: nowrap;
/* flex-wrap: wrap; */
/* flex-wrap: wrap-reverse; */
}
nowrap: 영역 밖으로 삐져나감
wrap: 줄 넘김
wrap-reverse: 위로 줄 넘김
메인축 방향 정렬
.container {
justify-content: flex-start;
/* justify-content: flex-end; */
/* justify-content: center; */
/* justify-content: space-between; */
/* justify-content: space-around; */
/* justify-content: space-evenly; */
}
수직축 방향 정렬
.container {
align-items: stretch;
/* align-items: flex-start; */
/* align-items: flex-end; */
/* align-items: center; */
/* align-items: baseline; */
}
여러행 정렬
.container {
flex-wrap: wrap;
align-content: stretch;
/* align-content: flex-start; */
/* align-content: flex-end; */
/* align-content: center; */
/* align-content: space-between; */
/* align-content: space-around; */
/* align-content: space-evenly; */
}
flex 축약
.item {
flex: 1;
/* flex-grow: 1; flex-shrink: 1; flex-basis: 0%; */
flex: 1 1 auto;
/* flex-grow: 1; flex-shrink: 1; flex-basis: auto; */
flex: 1 500px;
/* flex-grow: 1; flex-shrink: 1; flex-basis: 500px; */
}
flex 화면 중앙 정렬
.container {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100vh;
}
.container div {
width: 100px;
height: 100px;
border: 1px solid #000
}
참고:
https://studiomeal.com/archives/197
반응형
'Design > Markup' 카테고리의 다른 글
css 애니메이션 (0) | 2022.04.20 |
---|---|
checkbox 이미지 처리 (0) | 2022.04.14 |
CSS 가상요소(before)에 svg로 만든 font넣기 (0) | 2022.03.30 |
css 가상요소[Pseudo Element] before, after (0) | 2022.03.30 |
css 텍스트 말줄임 - text ellipsis (0) | 2022.03.29 |
Comments