Css code that restricts the display of single lines of text:
overflow: hidden; // The property specifies that what happens when the content overflows the element box is hidden outside the area.
white-space: nowrap; // The property sets how to deal with the blank inside the element.nowrap The text in the paragraph is not wrapped.
text-overflow: ellipsis ; // The property specifies what happens when the text overflow contains elements. ellipsis displays ellipses to represent the trimmed text.
Css code that restricts the display of multiple lines of text:
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; // Number of lines to display