text line max 2 line

Solutions on MaxInterview for text line max 2 line by the best coders in the world

showing results for - "text line max 2 line"
Alex
29 Nov 2020
1div {
2  width: 200px;
3}
4
5p {
6  display: block; /* Fallback for non-webkit */
7  display: -webkit-box;
8  height: 2.6em; /* Fallback for non-webkit, line-height * 2 */
9  line-height: 1.3em;
10  -webkit-line-clamp: 2; /* if you change this, make sure to change the fallback line-height and height */
11  -webkit-box-orient: vertical;
12  overflow: hidden;
13  text-overflow: ellipsis;
14}
15
16<div>
17  <p>
18    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
19  </p>
20<div>