css show only 2 lines of text code example
Example 1: text-overflow ellipsis multiple lines
p {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
Example 2: html css make p div into two lines
line-height:20px;
height:40px;
overflow:hidden;
white-space: pre;
Example 3: how to display text in css
display: inline-block;