상세 컨텐츠

본문 제목

말줄임표 (영역에서 텍스트넘칠때 ...으로 줄이기)

Front-end/CSS

by 본투비곰손 2023. 6. 12. 22:01

본문

728x90

한줄 일때

.txt_line {
      width:70px;
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
  }

 

한줄 이상일때

line-clamp

.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;  
  overflow: hidden;
}

 

728x90

'Front-end > CSS' 카테고리의 다른 글

position : sticky  (0) 2023.06.14
pointer-event  (0) 2023.06.14
appearance  (0) 2023.06.12
white-sapce  (0) 2023.06.12
object-fit  (0) 2023.06.12

관련글 더보기