๐ก
display?noneblockinlineinline-blockflexgrid

flex
flex container๐
display: flex container ์ ์
flex-direction: flex items๊ฐ ์ ๋ ฌ๋๋ ์ฃผ ์ถ( main-axis ) ์ค์
justify-content: ์ฃผ ์ถ( main-axis )์ ์ ๋ ฌ ๋ฐฉ๋ฒ ์ค์
align-items: ๊ต์ฐจ ์ถ( cross-axis )์ ์ ๋ ฌ ๋ฐฉ๋ฒ ์ค์
flex-wrap: flex items์ ์ค ๋ฐ๊ฟ ์ค์
flex-flow: a, b:flex-direction๊ณผflex-wrap๋จ์ถ ์์ฑ
display
display: flex
display: inline-flex
flex-direction
row: items๋ฅผ ์ํ์ถ( ์ผ์ชฝ์์ ์ค๋ฅธ์ชฝ ! )์ผ๋ก ์ ๋ ฌrow-reverse: row ๋ค์ง๊ธฐ !column: items๋ฅผ ์์ง์ถ( ์์์ ์๋ ! )์ผ๋ก ์ ๋ ฌcolumn-reverse: column ๋ค์ง๊ธฐ !justify-content
flex-start: ์ฃผ์ถ ์์๋ถํฐ ์ฐจ๊ณก์ฐจ๊ณก ์ ๋ ฌflex-end: ์ฃผ์ถ ๋๋ถํฐ ์ฐจ๊ณก์ฐจ๊ณก ์ ๋ ฌcenter: ๊ฐ์ด๋ฐ ์ ๋ ฌspace-evenly: ๋น ๊ณต๊ฐ์ ๊ท ์ผํ๊ฒ ๋๋์ด ์ ๋ ฌ โ ๋น ๊ณต๊ฐ / 3space-between: item๊ฐ์ ๊ฑฐ๋ฆฌ๋ฅผ ๋์ผํ๊ฒ ์ ๋ ฌspace-around: item์ ์์ชฝ margin ๋๋น๋ฅผ ๊ท ์ผํ๊ฒ ์ ๋ ฌ โ ๋น ๊ณต๊ฐ / 6align-items
flex-start: ๊ต์ฐจ ์ถ ์์๋ถํฐ ์ฐจ๊ณก์ฐจ๊ณก ์ ๋ ฌflex-end: ๊ต์ฐจ ์ถ ๋๋ถํฐ ์ฐจ๊ณก์ฐจ๊ณก ์ ๋ ฌcenter: ๊ต์ฐจ ์ถ ๊ฐ์ด๋ฐ ์ ๋ ฌflex-wrap
nowrap: ๋ชจ๋ items๋ฅผ ๊ณต๊ฐ ๋๋น์ ๊ด๊ณ ์์ด ์ฌ๋ฌ ์ค๋ก ๋๋์ง ์๋๋ค ( ํ ์ค์ ๋ชจ๋ ํ์ ! )wrap: item์ด ๊ณต๊ฐ ๋ฐ์ผ๋ก ๋๊ฐ ๊ฒฝ์ฐ ์ฌ๋ฌ ์ค๋ก ๋๋์ด ํ์wrap-reverse: wrap์ ์ญ๋ฐฉํฅ์ผ๋ก ํ์ !flex-flowflex-direction๊ณผ flex-wrap์ ํ๋ฒ์ ์ง์ !.container{
flex-flow: row wrap;
// flex-direction: row;
// flex-wrap: wrap;
}
flex itemorder: item์ ์์๋ฅผ ๊ฒฐ์ / ๊ธฐ๋ณธ๊ฐ: 0 / ์ซ์๊ฐ ์์์๋ก ์ ์์ !flex-grow: item์ ์ฆ๊ฐ ๋๋น ๋น์จ ์ค์ / ๊ธฐ๋ณธ๊ฐ: 0flex-shrink: item์ ๊ฐ์ ๋๋น ๋น์จ ์ค์ / ๊ธฐ๋ณธ๊ฐ: 1flex-basis: item์ ๊ณต๊ฐ ๋ฐฐ๋ถ ์ ๊ธฐ๋ณธ ๋๋น ์ค์ ( ์ต์ ๊ธฐ์ค ) / ๊ธฐ๋ณธ๊ฐ: autoflex: flex-grow flex-shrink flex-basis ์ถ์ฝ ์์ฑalign-self: ๊ต์ฐจ ์ถ( cross-axis )์์ item์ ์ ๋ ฌ ๋ฐฉ๋ฒ ์ค์ flex-start, flex-end, centergridgrid layout ๊ตฌ์ฑ์์
๐
grid container: ์ ์ฒด grid layout์ ๊ฐ์ธ๋ ์ญํ
grid item: grid container์ ์ํด ์๋ ํ์ DOM ์์
grid track: grid layout์ ํ ๋๋ ์ด
grid line: grid track์ ๊ตฌ๋ถํ๋ ์
grid cell: grid layout์์ ๊ฐ์ฅ ์์ ๋จ์์์, ํ ์ด๋ธ์ ์ ๊ณผ ์ ์ฌ !
grid area: ๋ค์์ grid๋ก ์ด๋ฃจ์ด์ง ์์ญ
display
display: flex,display: inline-flex์ ๊ฐ์ ๊ฐ๋ !
display: grid
display: inline-grid
display: flex
display: inline-flex
grid box model: ํํ ์ ์
grid-template-rows: row์ ๋ฐฐ์น ์ ์ ๊ฒฐ์ grid-template-columns: column์ ๋ฐฐ์น ์ ์ ๊ฒฐ์ grid-auto-rows: grid-template-rows์ ํต์ ๋ฅผ ๋ฒ์ด๋ ์์น์ ํธ๋ ํฌ๊ธฐ ์ง์ grid-auto-columns: grid-template-columns์ ํต์ ๋ฅผ ๋ฒ์ด๋ ์์น์ ํธ๋ ํฌ๊ธฐ ์ง์ grid box model: auto
fr: fraction, ๋จ์ ๊ณต๊ฐ์ ๋ถ๋ฐฐํ๋ ๋จ์.grid_container {
grid-template-columns: 1fr 2fr 1fr;
/* ์ ์ฒด ๊ฐ๋ก๋ฅผ 4๋ก ๊ท ๋ฑํ๊ฒ ๋๋ ๋ค 1, 2, 1 ๋น์จ๋ก ๋ถ๋ฐฐํ๋ค */
}span: ์์๊ฐ ๊ทธ๋ฆฌ๋์ ์ฌ๋ฌ ์ด์ด๋ ํ์ ๊ฑธ์ณ์ ์์นํ๋๋ก ์ง์ ํ ๋ ์ฌ์ฉ.item {
grid-column: span 2; /* 2๊ฐ์ ์ด์ ๊ฑธ์ณ์ ํ์ฅ */
}repeat(๋ฐ๋ณตํ์, ๋ฐ๋ณต๊ฐ): ๋ฐ๋ณต์ ์๋์ผ๋ก ์ฒ๋ฆฌํ๋ ํจ์.grid-container{
grid-template-columns: repeat( 4, 1fr);
}minmax(์ต์๊ฐ, ์ต๋๊ฐ): ์ต์, ์ต๋์ ํญ์ ์ง์ ํ๋ ํจ์
auto-fillcolumn์ ๊ฐ์๋ฅผ ๋ฏธ๋ฆฌ ์ ํ์ง ์๊ณ ์ค์ ๋ ๋๋น๋งํผ ์
์ฑ์ฐ๊ธฐauto-fit: column์ ๊ฐ์๋ฅผ ๋ฏธ๋ฆฌ ์ ํ์ง ์๊ณ ์ค์ ๋ ๋๋น๋งํผ ์
์ฑ์ฐ๊ธฐ๋น ๊ณต๊ฐ์ ์ ๋ค์ด ๋๋์ด ๊ฐ์ ธ์ ๋ฑ ๋ง๊ฒ ๊ธธ์ด๋ฅผ ์ค์
.grid-container{
grid-template-columns: repeat(auto-fit, minmax(20%, auto);
}
grid cell gap
row-gap: grid cell ์ฌ์ด์ row ๊ฐ๊ฒฉ ์ค์ column-gap: grid cell ์ฌ์ด์ column ๊ฐ๊ฒฉ ์ค์ gap: grid cell ์ฌ์ด์ ๊ฐ๊ฒฉ ์ค์ grid cell ์์ญ ์ง์ 
grid-column-start grid-column-end grid-columngrid-row-start grid-row-end `grid-row`/* item_red ๋ฒ์ ์ง์ ํ๊ธฐ, ์๋ ๋ ์ฝ๋๋ ๋ชจ๋ ๋์ผํ ์์ญ์ ์ง์ ํ๋ค */
.item_red {
grid-column: 1/3;
grid-row: 1/3;
}
.item_red {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 3;
}
grid ์ด๋ฆ์ผ๋ก ์ ์grid-template-areas: ๊ฐ ์์ญ( grid area )์ ์ด๋ฆ์ ๋ถ์ด๊ณ ๊ทธ ์ด๋ฆ์ ์ด์ฉํ์ฌ ๋ฐฐ์น.grid_container {
grid-template-areas:
"a b c"
". . ."
"d e f";
}
.title { grid-area: title; } /* title ์์ดํ
์ด ์ฐจ์งํ๋ ์์ญ title ์ด๋ฆ ๋ถ์ด๊ธฐ */othersgrid-auto-flow: ์์ดํ
์๋ ๋ฐฐ์น ์ค์ order: ๊ฐ ์์ดํ
์ ์๊ฐ์ ๋์ด ์์ ์ง์ align-items justify-items place-items: ์์ดํ
๋ค ์ธ๋ก, ๊ฐ๋ก, ์ธ๋ก+๊ฐ๋ก ์ ๋ ฌalign-content justify-content place-content:์์ดํ
๊ทธ๋ฃน ์ธ๋ก, ๊ฐ๋ก, ์ธ๋ก+๊ฐ๋ก ์ ๋ ฌalign-self justify-self place-self:์์ดํ
์ธ๋ก, ๊ฐ๋ก, ์ธ๋ก+๊ฐ๋ก ์ ๋ ฌposition๐ก HTML ๋ฌธ์ ์์์ ์์๊ฐ ๋ฐฐ์น๋๋ ๋ฐฉ์ ๊ฒฐ์ !
position ์ฌ์ฉ ์ top right bottom left ์์ฑ์ผ๋ก ์์น ์กฐ์ ๊ฐ๋ฅposition: relativeabsoluterelative absolute fixed ์กฐ์ ์์์ ๋ํด ์ง์ ๋ ๊ฐ์ ์๋์ ์ผ๋ก ์ด๋fixedsticky์๋จ ๊ณ ์ ๊ฒ์์ฐฝ, ์ต์๋จ์ผ๋ก ์ด๋ ๋ฒํผ ๋ฑ