웹 프로그래밍/CSS

text-overflow: ellipsis가 적용되지 않는다면?

728x90
반응형

먼저 확인해보자.

display: block인가?

width가 명확히 지정되었는가?

글자가 width를 넘어간게 맞는가?


1. display: flex에서는 적용되지 않는다.

2. 아래를 세트로 같이 줘보자.

overflow: hidden; 
text-overflow: ellipsis; 
white-space: nowrap; 
display: block;

 

https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow

 

text-overflow - CSS: Cascading Style Sheets | MDN

The text-overflow CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('…'), or display a custom string.

developer.mozilla.org

 

728x90
반응형

'웹 프로그래밍 > CSS' 카테고리의 다른 글

flex안의 요소가 눌리는 현상  (0) 2021.10.28