Last active
May 5, 2022 02:43
-
-
Save johnnyferreiradev/47ba695b59a85a544c5d830fa4ec7ab8 to your computer and use it in GitHub Desktop.
Limita o número de caracteres de um texto e adiciona três pontos (...) no final do texto
This file contains hidden or 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
/* Horizontal */ | |
p { | |
max-width: 15ch; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
/* Vertical */ | |
p { | |
display: -webkit-box; | |
max-width: 200px; | |
-webkit-line-clamp: 4; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment