Last active
September 27, 2020 07:03
-
-
Save sadmansh/e40358534b717be7b6283de11ad9c0b8 to your computer and use it in GitHub Desktop.
Limit text lines using CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-line-clamp: 2; /* number of lines to show */ | |
-webkit-box-orient: vertical; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment