๐ ์ดํํ 8hour
๐๐ผ ์ ๋นํ๊ฒ ๊ณต๋ถ
๐๐ผ ์ ๋นํ๊ฒ ๊ณต๋ถ
The Web Developer Bootcamp 2021
MDN CSS Reference
Google Fonts
๋๋ฆผ์ฝ๋ฉ Flexbox (CSS์ ๊ฝ)
Material Design color tool
A complete guide to flexbox
ํ๋์ค๋ฐ์ค ์ฐ์ตํ๊ธฐ: Flexbox Froggy
CSS Reset
BootStrap
Semantic UI
background-image: url("");
background-size: cover;
background-position: bottom;
(or)
background: coenter/40% no-repeat url(""), blue; -> background ์ฌ๋ฌ๊ฐ ๊ฐ์ง๋ ๋ฒ
link -> html
font-family-> css
body { font-family: Monstserrat, sans-serif; }
main { width: 60%; margin: 0 auto; }
h1 { font-size: 3rem; margin-bottom: 0; }
h1 + h2 { margin-top: 10px; }
h1, h2, h3 { font-family: Roboto, sans-serif; font-weight: 100; }
<span>Hello</span>
<span>World</span>
<!-- ์ด๋ ๊ฒ ํ๋ฉด ์ฌ์ด์ ๊ณต๊ฐ ์๊น-->
<span>Hello</span><span>World</span>
<!-- ์ด๋ ๊ฒ ํ๋ฉด ์ ์๊น, jam together-->
<img src=""><img src="">
<!-- ์ด๊ฒ๋ ๋ง์ฐฌ๊ฐ์ง์-->
<img src="">
<img src="">
-> ๊ทผ๋ฐ ์ด ๋ฌธ์ ๊ฐ flexbox๋ก ํด๊ฒฐ์ด ๋จ
์ด๋ฒ ๋ด์ฉ์ ๋ชจ๋ ์ค์ํจ
์ฐธ๊ณ ์ฌ์ดํธ: airbnb
ํ ์ปจํ
์ด๋ ์์์ ๊ณต๊ฐ์ ์ด๋ป๊ฒ ๋๋ ๊ฒ์ธ๊ฐ.
one-dimensional layout method for laying out items in rows or columns
recent addition to css, allows to distribute space dynamically across elements of and unknown size, hence the term "flex"
display: flex; ("์ผ, ๋๋ค ์ด์ flexbox์ผ")
flex-direction: row; (default)
flex-direction: row-reverse; (์์๋ฅผ ๋ฐ๊พธ๊ณ ์์์ ์ด ์ผ์ชฝ์์ ์ค๋ฅธ์ชฝ์ผ๋ก ์ด๋)
flex-direction: column; (main-axis goes from top to bottom)
flex-direction: column-reverse;
justify-content: flex-start; (default)
justify-content: flex-end; (์์์ ์ด ๋ฐ๋๋ก ์ด๋, ์์๋ ๋ฐ๋์ง ์์)
justify-content: center;
justify-content: space-between; (0 1 1 1 1 0)
justify-content: space-around; (1 2 2 2 2 1)
justify-content: space-evenly; (2 2 2 2 2 2)
flex-wrap: wrap;
์๋๋ container๊ฐ ์์ผ๋ฉด content๊ฐ shrink๋์ง๋ง wrap์ ์ฐ๋ฉด new column์ด ์๊ธฐ๋ฉฐ ์ ๊ทธ๋ฌ๊ฒ ๋จ
flex-wrap: wrap-reverse; (cross-axis๊ฐ ๋ฐ๋๋ก)
align-items: flex-start; (default, align along the beginning of cross axis)
align-items: flex-end; (cross-axis ๋ฐ๋๋ถํฐ ์์)
align-items: center; (center horizantly and vertically)
align-items: baseline; (text์ baseline์ ๋ง์ถฐ align, text ํฌ๊ธฐ๋ element's height ๋ค๋ฅผ ๋ ์ ์ฉํ ์ ์์)
aligh-content: space-between;
aligh-content: flex-start;
position float table ๋ก๋ ์ ๋๋ ๊ฒ๋ค์ ๊ฐ๋ฅํ๊ฒ ํด์ค
์๋๋ ํ
์คํธ์ ์ด๋ฏธ์ง ๋ฐฐ์น์ ํ์ฉ
float: left; ์ด๋ฏธ์ง๊ฐ ์ผ์ชฝ ๋ฐฐ์น, ํ
์คํธ๊ฐ ์ด๋ฏธ์ง ๊ฐ์ธ๋ฉด์ ์ค๋ฅธ์ชฝ์ ๋ฐฐ์น (right, center)
1) flexbox๋ ์ปจํ
์ด๋(๋ฐ์ค)์ ์ ์ฉ๋๋ ์์ฑ๊ฐ์ด ์กด์ฌ, ๊ทธ ์์ ๊ฐ๊ฐ item์ ์ ์ฉํ ์ ์๋ ์์ฑ๊ฐ ์กด์ฌ
2) main axis ์ ๋ฐ๋์ธ cross axis ์กด์ฌ
contaier์๋ display, flex-direction, flex-wrap, flex-flow, justify-content, aligh-items, align-content
item์๋ order, flex-grow, flex-shirink, flex, align-self
๐ธ ๋น ๋ฅด๊ฒ ์ฌ๋ฌ ๋ฐ์ค ๋ง๋ค ์ ์๋ ๋ฐฉ๋ฒ
div.container>div.item.item{}*10 + tab
<div class="container">
<div class="item itme1">1</div> *10
</div>
height: 100% (์ปจํ
์ด๋์ ๋ถ๋ชจ์ ๋์ด(body)์ ๋ง์ถค)
height: 100vh (๋ถ๋ชจ์ ์๊ด์์ด ๋ณด์ด๋ view point์ 100ํผ์ผํธ๋ฅผ ๋ค ์ฐ๊ฒ ๋ค)
flex-row: row;
flex-wrap: nowrap; (default)
์ด ๋ ๊ฐ๋ฅผ ํฉ์ณ์ ์ธ ์ ์๋ค
flex-flow: row nowrap;
justify-content : ์์ดํ ์ด๋ป๊ฒ ๋ฐฐ์นํ ๊ฑด์ง? (์ค์ฌ์ถ)
flex-direction: ์์ ๋ฐ๋, justify-content: ์์ ์ ๋ฐ๋
align-items: ์์ดํ
๋ฐฐ์น (๋ฐ๋์ถ)
align-content: (๋ฐ๋์ถ)
.item1 { order:2; } ๋ฅผ ํตํด์ 1๋ฒ์งธ ์์ดํ ์ ๋๋ฒ์งธ๋ก ์ด๋์ํฌ ์ ์๋ค -> ํ์ง๋ง ์ ์ฐ์
flex-grow: 0; (default)
flex-grow: 1; (์ ์ฒด๋ฅผ ๊ฝ ์ฑ์ฐ๋ ค๊ณ ํ๊ฒ ๋จ)
flex-shirink: 0; (default)
flex-shirink: 2; (์ค์ด๋ค ๋ ๋ ๋ฐฐ๋ก ๋ ์๊ฒ ์ค์ด๋ค๊ธฐ)
flex-basis: auto; (dafault)
flex-basis: 60%; (ํญ์ 60ํผ์ผํธ ์ฐจ์ง)
align-self: center; ์์ดํ
๋ณ๋ก ์ ๋ ฌ, ํ๋๋ง ๋ค๋ฅด๊ฒ ํ๊ณ ์ถ์ ๋
align-self: fix-end;
flex-basis: the initial size that element should be added into our box as and it might be with it might be a height or width depending on the main axis direction.
flex-grow: controls the amount of available space an element should take up.
flex-shrink:
max-width, min-width๋ก ๋ ์ค์ ํ ์ ์์
div: nth-of-type(5) { flex-grow: 2; }
flex: 1;
์ข์ ์ฐธ๊ณ ์ฌ์ดํธ: stripe.com
@media (min-width: 800px) {h1 { color: purple; }}
Bootstrap: Components, Grid System
bootstrap ์ฌ์ฉ์์: blackbox
bootstrap ์ฌ์ฉ์์: taskade