JSFiddle - React, Tailwind, and code Playground

by Vipin Patil

HTML

<div >
<div  >
    <div class="truncate">    1234567890a 1234567890  1234567890b 1234567890 1234567890c  12345678901234567890d 1234567890e  12345678901234567890f 1234567890g  1234567890h 1234567890i 1234567890  12345678901234567890 1234567890  12345678901234567890 1234567890  12345678901234567890 1234567890  1234567890</div> 
    
     
</div>
</div>

CSS

.truncate {
  width: 80%;
 /* white-space: nowrap;*/
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;

  text-overflow: ellipsis;
   height:38px; 
    -webkit-line-clamp: 2;

}