Created
July 19, 2021 18:26
-
-
Save russo97/c3cedef5c3637faaaca66cdbec25501f to your computer and use it in GitHub Desktop.
Text line limit with 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