CSS Advanced

Emnet Tips

  • + ์ธ์ ‘, > ์ž์‹, * ๊ฐœ์ˆ˜

    • a+ul>li*3

    • a+ul.nav-items>li.nav-item*3

  • link:css

    • link tag ๋งŒ๋“ค์–ด์คŒ

  • line-height

    • ํ•œ์ค„ text์ผ ๋•Œ ์ˆ˜์ง ๊ฐ€์šด๋ฐ ์ •๋ ฌ

  • display: flex

    • container์™€ ์ž์‹์š”์†Œ๊ฐ€ item์œผ๋กœ ๊ตฌ์„ฑ๋จ

Layout Tips

  1. Box model

    • ๋ชจ๋“  ์š”์†Œ๋ฅผ ๋„ค๋ชจ๋„ค๋ชจ๋กœ ์ƒ๊ฐํ•ด๋ผ!

  2. position: absolute;

    • ์–ด๋”˜๊ฐ€์˜ ๋์— ์˜ฌ๋ฆฌ๊ณ  ์‹ถ์œผ๋ฉด absolute

    • Side์— ๋†“๊ณ  ์‹ถ์œผ๋ฉด flex

  3. flex

    • ๋ถ€๋ชจ ์š”์†Œ (container)

      • display: flex; ๊ฐ€ ์ ์šฉ๋œ ๊ฒƒ

      • inline, block์ด ์ ์šฉ๋˜์ง€ ์•Š์Œ

    • ์ž์‹ ์š”์†Œ(item)

    • main axis

      • justify-content

    • cross axis

      • align-items

        : ์ˆ˜์ง ์ •๋ ฌ์— ์ฃผ๋กœ ์‚ฌ์šฉ

  4. rem

    : ์ผ๋ฐ˜์ ์ธ browser๋Š” 16px

  5. box-sizing: border-box;

  6. margin: ์ƒํ•˜ / ์ขŒ์šฐ;

Last updated