grid
๋ณด์ถฉ
grid
์ฐธ๊ณ ์ฌ์ดํธ
grid
์ฐ์ต ์ฌ์ดํธ
grid-template-areas
[์ถ์ฒ: 1๋ถ ์ฝ๋ฉ]
.container {
grid-template-areas:
"header header header"
" a main b "
" . . . "
"footer footer footer";
}
header
: ์ฒซ ๋ฒ์งธ row์์ 3๊ฐ์ column์ ์ฐจ์ง๋น์นธ
: ๋ง์นจํ๋ none
์ ์ฌ์ฉ, ๋ง์นจํ๋ ์ฌ๋ฌ๊ฐ๋ฅผ ์จ๋ ์๊ด ์๋ค.grid-area
์์ฑ์ผ๋ก ์ด๋ฆ ์ง์ .header { grid-area: header; }
.sidebar-a { grid-area: a; }
.main-content { grid-area: main; }
.sidebar-b { grid-area: b; }
.footer { grid-area: footer; }
grid
๋ฅผ ์ด์ฉํ Holy Grail Layout์์ ๋ ์ด์์์ ๊ตฌํํ ๋ ๊ฐ ๊ตฌ์ญ์ ์ด๋ฆ์ ๊ฐ ํด๋น ์์์
::before
๋ฅผ ์ด์ฉํด์ ์์ฑํจ
=>::before
์์๊ฐ ๋ก๊ณ ์ ๋ฉ๋ด๋ฅผ ๋ฎ์ด๋ฒ๋ฆผ
grid
๋ฅผ ์ด์ฉํ 3D Grid Perspectiveflex
๋ฅผ ์ด์ฉํ 3D Grid Perspectivez-index๊ฐ ๋์ํ์ง์๋ ์ด์ 4๊ฐ์ง (๊ทธ๋ฆฌ๊ณ ๊ณ ์น๋ ๋ฐฉ๋ฒ)
z-index
๊ฐ ์ ์ฉ๋ ์์์transform
์ ์ค์ ํ๋ฉดz-index: 0
์ธ ๊ฒ์ฒ๋ผ ๋์stacking context
๊ฐ๋ฐ์ ๋๊ตฌ์์
Add class
/Remove class
ํ์ธํ๋ ๋ฐฉ๋ฒ
- ๊ฐ๋ฐ์ ๋๊ตฌ >
.cls
> ์ฒดํฌ๋ฐ์คclick!
<fieldset>
์<form>
๋ฐ๊นฅ์ ์์นํ ์ ์๋ค.
<fieldset>
: HTML<form>
์์์ ๊ทธ๋ฃน์ ๋ง๋ค ์ ์๊ณ ,<legend>
๋ก ๊ทธ๋ฃน์ ์ค๋ช ์ ์ ๊ณตํ ์ ์๋ค.
- ํ์ด์ง ๋ด
<form>
์id
๋ฅผ ๋ฐ์ ์ ์๋form
ํน์ฑ์ ๊ฐ์ง๋ค.
=><fieldset>
๊ณผ ์ฐ๊ฒฐํ<form>
์id
=><fieldset>
์ด ํด๋น<form>
์์ ์์นํ์ง ์์๋ ์ฐ๊ฒฐํ ์ ์๋ค.disabled
ํน์ฑ : ๋ชจ๋ ํ์ ์์๋ค์ ๋นํ์ฑํ,<form>
์submit
ํ ๋ ๋ฐ์ดํฐ์ ํฌํจ๋์ง ์์
<img>
์ ์ด์ํ ์ฌ๋ฐฑstack overflow -
<img>
extra space
<img>
๋inline
์์๋ก ๋ฌธ์์ ๋์ผํ ๋ผ์ธ์ ๋ฐฐ์น
=><img>
๋vertical-align: baseline
์ ๋์ผํ ๋ผ์ธ์ ์์นํ์ฌ 1~3px์ ์์ฃผ ์์ ์ฌ๋ฐฑ์ด ์๋ค.- ์ฌ๋ฐฑ ์์ ๋ ๋ฐฉ๋ฒ
<img>
์display: block
์ ์ ์ธ<img>
์vertical-align: bottom;
/vertical-align: top;
/vertical-align: middle;
์ ์ ์ธ
Ctrl
+C
/ Ctrl
+V
grid
๋ ์์ง ํท๊ฐ๋ฆฐ๋ค. ๋ง์ด ์ฐ์ตํด๋ด์ผ์งโจ