CSS Layout
Table of Contents
๋ค๋จ ๋ ์ด์์
position
display
float
๋ค๋น๊ฒ์ด์
์ด๋ฏธ์ง ๋ฒํผ
ํ ์คํธ ๋ค๋น๊ฒ์ด์
animation, transition
์์์ ๋ณํ
์์ ํด๋ฆฌํ
CSS Position
static
: default ๊ฐ (๊ธฐ์ค ์์น)
๊ธฐ๋ณธ์ ์ธ ์์์ ๋ฐฐ์น ์์์ ๋ฐ๋ฆ (์ข์ธก ์๋จ)
๋ถ๋ชจ ์์ ๋ด์์ ๋ฐฐ์น๋ ๋๋ ๋ถ๋ชจ ์์์ ์์น๋ฅผ ๊ธฐ์ค์ผ๋ก ๋ฐฐ์น๋๋ค
ex)
div ๋ block ์์ฑ
width ๊ฐ 100px์ด๋ฏ๋ก ํ๋ฉด์์ 100px๊ฐ ๋บ ๋งํผ margin์ผ๋ก ๋ถ๋๋ค!!
relative
: ์๋์์น
absolute
: ์ ๋์์น
๊ธฐ์ค
๋ถ๋ชจ (์กฐ์์์) ์ค์ static์ด ์๋ ๊ฒ์ ๊ธฐ์ค์ผ๋ก ํ๋ค
๋ณธ์ธ ๋ฟ๋ง ์๋๋ผ ๋ค๋ฅธ ํ์ ๋ค์ ์์น์๋ ์ํฅ์ ๋ฏธ์น๋ค!
์ฌ์ฉ ์ ์ฃผ์ํ ๊ฒ!
fixed
: ์ ๋์์น
CSS Float
CSS float ์์ฑ
float์ ์์๋ฅผ ์ผ๋ฐ์ ์ธ ํ๋ฆ (normal flow)์์ ๋ฒ์ด๋๋๋ก ํ๋ ์์ฑ ์ค ํ๋
๋ฐ๋์ clear ์์ฑ์ ํตํด ์ด๊ธฐํ๊ฐ ํ์ํ๋ฉฐ, ์์์น ๋ชปํ ์ํฉ์ด ๋ฐ์ํ ์ ์์
float
์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐblock
์ฌ์ฉ์ ๋ปํ๋ฉฐdisplay
๊ฐ์ดinline
์ธ ๊ฒฝ์ฐ block์ผ๋ก ๊ณ์ฐ
float์ด ๋ฐ์์ํค๋ ๋ฌธ์
Last updated
Was this helpful?