css position relative, absolute, fixed, sticky, z-index, display, flex, ์ํ, ์์ง ์ ๋ ฌ ๋ ์ด์์
position : ์์์ ์์น ์ง์ ๊ธฐ์ค์ผ๋ก position๊ณผ ๊ฐ์ด ์ฌ์ฉํ๋ css์์ฑ๋ค์ ๋ชจ๋ ์์๋ฅผ ์ฌ์ฉํ ์ ์๋ค. (top, bottom, left, right, z-index..)static : ๊ธฐ์ค ์์, ํฌ์ง์
์์relative : ์์ ์์ ์ ๊ธฐ์คabsolute : ์์น ์ ๋ถ๋ชจ ์์๋ฅผ ๊ธฐ์ค (์์น ์ ๋ถ๋ชจ ์์๋ฅผ ๊ผญ ํ์ธํด์ผํจ!), ๋ถ๋จ๋ฉด์ ๊ฒน์ณ์งfixed : ๋ทฐํฌํธ(๋ธ๋ผ์ฐ์ )๋ฅผ ๊ธฐ์คsticky : ์คํฌ๋กค ์์ญ ๊ธฐ์คtop, bottom, left, right : ์์์ ๊ฐ ๋ฐฉํฅ๋ณ ๊ฑฐ๋ฆฌ ์ง์ auto : ๋ธ๋ผ์ฐ์ ๊ฐ ๊ณ์ฐ๋จ์ : px, em. rem ๋ฑ ๋จ์๋ก ์ง์ relative์ absoulte ์์ ์์ ์์ (stack order) ์ด๋ค ์์๊ฐ ์ฌ์ฉ์์ ๋ ๊ฐ๊น๊ฒ ์๋์ง(์์ ์์ด๋..
2023. 8. 13.