๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

CSS ์†์„ฑ 15. columns

โ—๏ธ ํ•ด๋‹น ๊ธ€์€ ํŒจ์ŠคํŠธ์บ ํผ์Šค - ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ ๊ฐ•์˜์—์„œ HTML & CSS, SASS(SCSS) Part์˜ ๋ฐ•์˜์›… ๊ฐ•์‚ฌ๋‹˜์˜ ๊ฐ•์˜์ž๋ฃŒ๋ฅผ ์ •๋ฆฌํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ผ๋ฐ˜ ๋ธ”๋ก ๋ ˆ์ด์•„์›ƒ์„ ํ™•์žฅํ•˜์—ฌ ์—ฌ๋Ÿฌ ํ…์ŠคํŠธ ๋‹ค๋‹จ์œผ๋กœ ์‰ฝ๊ฒŒ ์ •๋ฆฌํ•˜๋ฉฐ, ๊ฐ€๋…์„ฑ ํ™•๋ณด

2020-02-03-css-์†์„ฑ-15-columns-image-0

columns


columns#

๋‹ค๋‹จ์„ ์ •์˜ - ๋‹จ์ถ• ์†์„ฑ


์†์„ฑ ๊ฐ’#

๊ฐ’์˜๋ฏธ๊ธฐ๋ณธ๊ฐ’
auto๋ธŒ๋ผ์šฐ์ €๊ฐ€ ๋‹จ์˜ ๋„ˆ๋น„์™€ ๊ฐœ์ˆ˜๋ฅผ ์„ค์ •['auto']
column-width๋‹จ์˜ ์ตœ์  ๋„ˆ๋น„๋ฅผ ์„ค์ •['auto']
column-count๋‹จ์˜ ๊ฐœ์ˆ˜๋ฅผ ์„ค์ •['auto']

์‚ฌ์šฉ๋ฒ•#

columns: ๋„ˆ๋น„ ๊ฐœ์ˆ˜;
.text {columns: 100px 2;}

column-width#

๋‹จ์˜ ์ตœ์  ๋„ˆ๋น„๋ฅผ ์„ค์ • - ๊ฐœ๋ณ„ ์†์„ฑ


์†์„ฑ ๊ฐ’#

๊ฐ’์˜๋ฏธ๊ธฐ๋ณธ๊ฐ’
auto๋ธŒ๋ผ์šฐ์ €๊ฐ€ ๋‹จ์˜ ๋„ˆ๋น„๋ฅผ ์„ค์ •auto
๋‹จ์œ„px , em , cm ๋“ฑ ๋‹จ์œ„๋กœ ์ง€์ •

์‚ฌ์šฉ๋ฒ•#

column-width: ๋„ˆ๋น„;

โ˜๏ธ ๊ฐ ๋‹จ์ด ์ค„์–ด๋“ค ์ˆ˜ ์žˆ๋Š” ์ตœ์  ๋„ˆ๋น„(์ตœ์†Œ ๋„ˆ๋น„)๋ฅผ ์„ค์ •ํ•˜๋ฉฐ, ์š”์†Œ์˜ ๋„ˆ๋น„๊ฐ€ ๊ฐ€๋ณ€ํ•˜ ํ•˜๋‚˜์˜ ๋‹จ์ด ์ตœ์  ๋„ˆ๋น„๋ณด๋‹ค ์ค„์–ด๋“ค ๊ฒฝ์šฐ ๋‹จ์˜ ๊ฐœ์ˆ˜๊ฐ€ ์กฐ์ •๋œ๋‹ค.


column-count#

๋‹จ์˜ ๊ฐœ์ˆ˜๋ฅผ ์„ค์ • - ๊ฐœ๋ณ„ ์†์„ฑ


์†์„ฑ ๊ฐ’#

๊ฐ’์˜๋ฏธ๊ธฐ๋ณธ๊ฐ’
auto๋ธŒ๋ผ์šฐ์ €๊ฐ€ ๋‹จ์˜ ๊ฐœ์ˆ˜๋ฅผ ์„ค์ •auto
์ˆซ์ž๋‹จ์˜ ๊ฐœ์ˆ˜๋ฅผ ์„ค์ •

์‚ฌ์šฉ๋ฒ•#

column-count: ๊ฐœ์ˆ˜;

column-gap#

๋‹จ๊ณผ ๋‹จ ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ ์„ค์ •


์†์„ฑ ๊ฐ’#

๊ฐ’์˜๋ฏธ๊ธฐ๋ณธ๊ฐ’
normal๋ธŒ๋ผ์šฐ์ €๊ฐ€ ๋‹จ๊ณผ ๋‹จ ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ์„ ์„ค์ • ( 1em )normal
๋‹จ์œ„px , em , cm ๋“ฑ ๋‹จ์œ„๋กœ ์ง€์ •

์‚ฌ์šฉ๋ฒ•#

column-gap: ๊ฐ„๊ฒฉ;

column-rule#

๋‹จ๊ณผ ๋‹จ ์‚ฌ์ด์˜ (๊ตฌ๋ถ„)์„ ์„ ์ง€์ • - ๋‹จ์ถ• ์†์„ฑ

๊ฐ’์˜๋ฏธ๊ธฐ๋ณธ๊ฐ’
column-rule-width์„ ์˜ ๋‘๊ป˜๋ฅผ ์ง€์ •medium
column-rule-style์„ ์˜ ์ข…๋ฅ˜๋ฅผ ์ง€์ •none
column-rule-color์„ ์˜ ์ƒ‰์ƒ์„ ์ง€์ •์š”์†Œ์˜ ๊ธ€์ž์ƒ‰๊ณผ ๋™์ผ

์‚ฌ์šฉ๋ฒ•#

column-rule: ๋‘๊ป˜ ์ข…๋ฅ˜ ์ƒ‰์ƒ;

Reference#

ํŒจ์ŠคํŠธ์บ ํผ์Šค - ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ ๊ฐ•์˜ - HTML & CSS, SASS(SCSS) Part by ParkYoungWoong