See the Pen white-space by Taejin Kim (@kimtaejin3) on CodePen.
์๋ฅผ ๋ณด๋ฉด white space๊ฐ ์์ ๊ฒฝ์ฐ์๋ ํ ์คํธ์ ๊ธธ์ด๊ฐ ๋ถ๋ชจ์ ๋๋น๋ณด๋ค ์ปค์ง๋ฉด ๊ทธ๋๋ก ๋ฒ์ด๋๊ฒ ๋ฉ๋๋ค.
๊ทธ๋ฌ๋ฉด ํ ๋ฒ white space๋ฅผ ๋ง๋ค์ด ๋ด ์๋ค.
See the Pen white-space2 by Taejin Kim (@kimtaejin3) on CodePen.
์์ ๊ฐ์ด ๋ถ๋ชจ์ ๋๋น๋ฅผ ๋ฒ์ด๋์ง ์์ผ๋ฉฐ ์ค๋ฐ๊ฟ์ด ๋ฉ๋๋ค. ๋์ฒด ์ ์ค๋ฐ๊ฟ์ด ์๊ธฐ๋ ๊ฑธ๊น์????
css์ white-space ์์ฑ์ ์๋ฉด ๊ถ๊ธ์ฆ์ด ํ๋ฆฌ๊ฒ ๋ฉ๋๋ค.
mdn์ผ๋ก ๊ฐ๋ณด์ฃ !!
white-space ์์ฑ์ ์ด๊ธฐ๊ฐ์ด normal ์ด๋ผ๊ณ ๋์ด ์์ต๋๋ค. normal์ ์๋ฏธ๋ ๋ฌด์์ผ๊น์?
์๋ฅผ ํตํด normal์ ์๋ฏธ๋ white-space ๋ฅผ ์ค๋ฐ๊ฟ ์ํค๋ ๊ฐ(value)์ด๋ผ๋ ๊ฒ์ ์ ์ถํ ์ ์์ต๋๋ค.
๋ฐ๋ก ์๋์ white-space: nowrap์ ํ๋ฉด ์ค๋ฐ๊ฟ์ ํ์ง ์์ต๋๋ค.
๊ฒฐ๋ก ์ ์ผ๋ก๋ white-space์ ์ด๊ธฐ๊ฐ์ด normal์ด์ด์ white space๊ฐ ์์์ ์ค๋ฐ๊ฟ์ด ์๊ธฐ๋ ๊ฒ์ ๋๋ค.
See the Pen Untitled by Taejin Kim (@kimtaejin3) on CodePen.
white-space: nowrap์ผ๋ก ์ค์ ํ์ white space๊ฐ ์๋๋ผ๋ ์ค๋ฐ๊ฟ์ด ๋์ง ์๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
'css' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[tailwind css] Font size, Colors (0) | 2023.10.04 |
---|---|
[tailwind-css] ์ด๊ธฐ์ธํ ํ๊ธฐ (1) | 2023.10.03 |
[css] ๋ ์ด์์ ์ก์ ๋ flex-basis๊ฐ ์๋ width๋ฅผ ์ฐ๋ ์ด์ (0) | 2023.07.28 |
[css] width auto์ width %์ ์ฐจ์ด ์ ๋ฆฌ (0) | 2023.01.11 |
[css ๊ฐ๋ ] cascading (0) | 2023.01.09 |