Skip to content

Instantly share code, notes, and snippets.

Created October 24, 2013 01:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codfish/7129742 to your computer and use it in GitHub Desktop.
"-webkit-line-clamp is an unsupported WebKit property that limits the number of lines of text displayed in a block element. In order to achieve the effect, it needs to be combo-ed with a couple of other exotic WebKit properties."
* Truncate paragraph with an ellipsis, while specifying exactly how many lines you want
* source:
#content-body {
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment