CSS text more than 2 lines hidden and show ellipsis

Hide the text beyond two lines and show the ellipsis code as follows:

{
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}

/* Autoprefixer: off */ If you find that two lines of text are displayed but no ellipsis is shown, add the following code:

/* autoprefixer: off */
{
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

Read More: