Answers for "text-truncate two lines"

CSS
1

text truncate after 3 lines

.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;  
}
Posted by: Guest on August-14-2021
0

truncate multiline text

p {
    width:100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    background:#fff;
    position:absolute;
}
// I did with just the solution down:
p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
Posted by: Guest on February-02-2022

Code answers related to "text-truncate two lines"

Browse Popular Code Answers by Language