일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 프로세스 방지
- bucket cors
- error
- vuetifyjs
- naver storage bucket error
- v-text-field height
- xlsx
- CSS
- 동일 프로세스
- JavaScript
- electron-nuxt
- Vuetify
- Vue
- sequelize
- f035d
- nodejs
- vuejs
- onsenui
- bucket max-key
- naver storage
- c#
- onsen-ui
- kotlin
- sort
- v-select
- NUXT
- MySQL
- 동일 프로그램
- Electron
- Android
- Today
- Total
앙큼한 개발기록
[CSS] 맨날 까먹는 white-space 정리 본문
가끔 쓰여 쓸때마다 까먹는 white-space의 속성들
오늘 깔끔하게 정리해 보자.
참고: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
white-space - CSS: Cascading Style Sheets | MDN
The white-space CSS property sets how white space inside an element is handled.
developer.mozilla.org
white-space 속성
white-space: normal;
white-space: nowrap;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
white-space: break-spaces;
normal (default)
- 띄어쓰기는 합침 (하나로)
- 개행도 띄어쓰기로 간주
- 폭(width)에 따라서 개행됨
nowrap
- 띄어쓰기 합침, 개행도 띄어쓰기로 간주
- 폭에 영향을 받지 않음 (normal과의 차이점)
pre
- 개행, <br> 태그 다 먹음
- 띄어쓰기도 다 먹음
- 폭에 영향을 받지 않음
pre-wrap
- 개행, <br> 태그 다 먹음
- 띄어쓰기도 다 먹음
- 폭에 영향을 받음 (pre와의 차이점)
pre-line
- 개행, <br> 태그 다 먹음
- 띄어쓰기는 축소됨 (normal 과 nowrap처럼)
- 폭에 영향을 받음
break-spaces
- pre-wrap과 동일
- 라인 끝의 공백, 개행 뒤 공백도 다 먹음 (pre-wrap과의 차이점)
네모난 div 상자 박스 안에 글자를 넣을때 속성에 맞는 글자를 넣고
보통 text-overflow와 overflow를 같이 써서 글자 뒤에 ...을 만든다거나
글자를 잘라서 화면을 맞출때 유용하게 사용 된다.
ex)
끝.
'개발 > html&css' 카테고리의 다른 글
phpstorm 들여쓰기 조절하기 (0) | 2020.09.10 |
---|---|
내부 링크 시 헤더랑 화면 겹칩 현상 (0) | 2018.01.17 |
Object doesn't support property or method '~~' (0) | 2018.01.17 |