Created
April 23, 2016 06:49
-
-
Save MOxFIVE/2c20e952d8fcc5da88d51a95c49d4d5c to your computer and use it in GitHub Desktop.
text-overflow: 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
<span>CSS is awesome, especially when you can scroll | |
to see extra text instead of just | |
having it overlap other text by default.</span> | |
<p>CSS is awesome, especially when you can scroll | |
to see extra text instead of just | |
having it overlap other text by default.</p> | |
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
span { | |
display: inline-block; | |
max-width: 14em; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
p { | |
display: -webkit-box; | |
-webkit-line-clamp: 3; | |
-webkit-box-orient: vertical; | |
text-overflow: ellipsis; | |
overflow : hidden; | |
max-width: 15em; | |
line-height: 1.5; | |
} | |
span, p { | |
border: 1px solid black; | |
padding: .5em; | |
font-family: "Lucida Grande", Verdana, "Helvetica Neue", Arial; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment