Created
June 1, 2022 12:48
-
-
Save whitep4nth3r/3e4e638201debb4132d0680bb5957274 to your computer and use it in GitHub Desktop.
Truncate text by height with ellipses (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
.truncate { | |
overflow: hidden; | |
-webkit-line-clamp: 2; | |
text-overflow: ellipsis; | |
-webkit-box-orient: vertical; | |
display: -webkit-box; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment