Others




How to Apply Ellipsis(...) to multiline text in CSS


If you want to show n lines of text in a paragraph, use the following CSS properties. The following example shows, how to display only 5 lines of text in paragraph.

 
.overflow-text{
  text-align:justify;
  display: -webkit-box;
  overflow : hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;  
}
Try it Yourself
Output