๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’š UIUX ์›นํผ๋ธ”๋ฆฌ์…” ๊ณผ์ •(6๊ฐœ์›”)

2021-04-20 (8์ผ์ฐจ) img ์†์„ฑ๊ณผ ์‚ฌ์ด์ฆˆ ์กฐ์ ˆ ๋ฐฉ๋ฒ•

by widely design 2021. 4. 20.

35๊ฐ•~38๊ฐ•

 

- img

  ์—ด๊ณ  ๋‹ซ๋Š” ๊ตฌ์กฐ๊ฐ€ ์•„๋‹Œ ํ•˜๋‚˜์งœ๋ฆฌ์ด๋‹ค.
  ์ž์‹์„ ๊ฐ€์งˆ ์ˆ˜ ์—†๋‹ค.
    ex) <img src="์ด๋ฏธ์ง€URL" alt="">

  display๋Š” inline์ด๋‹ค.

  ์ด๋ฏธ์ง€๋Š” ๊ณ ์œ ์˜ ๋น„์œจ์ด ์žˆ์Œ

    → ๋„ˆ๋น„๋‚˜ ๋†’์ด ํ•˜๋‚˜์˜ ๊ฐ’๋งŒ ์ค˜๋„ ์ •๋น„๋ก€๋กœ ์ปค์ง

    → ๋„ˆ๋น„์™€ ๋†’์ด ๋‘๊ฐœ์— ๊ฐ’์„ ์ค€๋‹ค๋ฉด ๋น„๋ก€๊ฐ€ ๋‹ฌ๋ผ์ง

 

- ๋„ˆ๋น„์™€ ๋†’์ด ๋‘๊ฐœ์— ๊ฐ’์„ ์ค˜์„œ ๋น„๋ก€๊ฐ€ ์•ˆ ๋งž์„ ๋•Œ

  - object-fit : contain;

    → ๋น„์œจ์ด ์œ ์ง€๋˜๊ฒŒ ์ปค์ง

 

  - object-fit : cover;

    → ๋นˆ๊ณต๊ฐ„์ด ์—†์ด ์ปค์ง

  - object position

    : ๋ณด์ด๋Š” ๋ถ€๋ถ„์„ ์กฐ์ •ํ•˜๋Š” ๊ฒƒ

      ex) object-position : 0% 50%;

      ex) object position : right top; 

 

 

#๋ฌธ์ œ. ์ด๋ฏธ์ง€ 6๊ฐœ๋ฅผ 3x2 ๊ฐ€์šด๋ฐ ์ •๋ ฌ๋กœ ๋ฐฐ์—ดํ•ด์ฃผ์„ธ์š”.
         ์กฐ๊ฑด : ์ด๋ฏธ์ง€๊ฐ„์˜ ์—ฌ๋ฐฑ 50px, ๋ชจ๋“  ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋Š” ๊ฐ™์•„์•ผ ํ•จ

๋ฒ„์ „1) nbsp์™€ br์‚ฌ์šฉ div์— ์ด๋ฏธ์ง€ 6๊ฐœ ๊ฐ์‹ธ๊ธฐ

  <div><img><img><img><img><img><img></div>

๋ฒ„์ „2) nbsp์™€ br ์‚ฌ์šฉ, div ํ•˜๋‚˜์— ์ด๋ฏธ์ง€๋ฅผ 3๊ฐœ์”ฉ ๊ฐ์‹ธ๊ธฐ

  <div><img><img><img></div> <div><img><img><img></div>

๋ฒ„์ „3) nbsp ์‚ฌ์šฉ, br์‚ฌ์šฉ๊ธˆ์ง€, div ํ•˜๋‚˜์— ์ด๋ฏธ์ง€๋ฅผ 3๊ฐœ์”ฉ ๊ฐ์‹ธ๊ธฐ, div ์‚ฌ์ด์— section ๋„ฃ๊ณ  ๋†’์ด ์ง€์ •

  <div><img><img><img></div> <section></section> <div><img><img><img></div>

๋ฒ„์ „4) nbsp ์‚ฌ์šฉ, div ํ•˜๋‚˜์— ์ด๋ฏธ์ง€๋ฅผ 3๊ฐœ์”ฉ ๊ฐ์‹ธ๊ธฐ, div ์‚ฌ์ด์— nav ๋„ฃ๊ณ  ์ธ๋ผ์ธ CSS๋กœ ๋†’์ด ์ง€์ •

  <div><img><img><img></div> <nav style=""></nav> <div><img><img><img></div>

๋ฒ„์ „5) nbsp์™€ br ์‚ฌ์šฉ ๊ธˆ์ง€, ์ด๋ฏธ์ง€ ์‚ฌ์ด์— nav ํƒœ๊ทธ ๋„ฃ๊ธฐ

  <div><img><nav></nav><img><nav></nav><img></div>

  <nav style=""></nav>

  <div><img><nav></nav><img><nav></nav><img></div>

๋ฒ„์ „6) nbsp์™€ br ์‚ฌ์šฉ ๊ธˆ์ง€, ๊ฐ๊ฐ์˜ ์ด๋ฏธ์ง€๋ฅผ nav ํƒœ๊ทธ๋กœ ๊ฐ์‹ธ๊ธฐ

  <div><img><nav></nav><img><nav></nav><img></div>

  <section style=""></section>

  <div><img><nav></nav><img><nav></nav><img></div>

 

- margin (-left, right, top, bottom :px;)

  ๋ฐ”๊นฅ์ชฝ์œผ๋กœ ์—ฌ๋ฐฑ์„ ์คŒ

 

- padding (-left, right, top, bottom :px;)

  ์•ˆ์ชฝ์œผ๋กœ ์—ฌ๋ฐฑ์„ ์คŒ

 

- a, span (img ์ œ์™ธ)

  width, height, margin, padding๊ฐ’ ์•ˆ ๋จน์Œ

  ๋•Œ๋ฌธ์— display์— block์ด๋‚˜ inline-block์„ ์ค˜์•ผํ•จ

 

#๋ฌธ์ œ. ์ด๋ฏธ์ง€6๊ฐœ๋ฅผ margin๊ณผ padding์„ ์ด์šฉํ•˜์—ฌ 3X2 ๊ฐ€์šด๋ฐ ์ •๋ ฌ๋กœ ๋ฐฐ์—ดํ•ด์ฃผ์„ธ์š”.

๋Œ“๊ธ€