Created
May 27, 2022 07:55
-
-
Save maximLyakhov/d137b845c0304d35f9ea7f66c819bc15 to your computer and use it in GitHub Desktop.
css text ellipsis
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
.your-class { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
-webkit-line-clamp: 3; /* number of max lines */ | |
} | |
/* https://stackoverflow.com/a/19049457 */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment