css max line length code example
Example 1: css limit text length
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
Example 2: restrict a paragraph height css
.class{
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-height: 16px;
max-height: 32px;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
Example 3: text limit in css
body {
margin: 20px;
}
.text {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}