Shorten Text With CSS2:57 with Dustin U
Ever wondered how to shorten text with an ellipsis (...)? It’s quite easy to do and only requires a few lines of CSS. Follow along as I take you through setting this up!
-webkit-line-clamp to show only a certain amount of lines of text can be a useful way to control how much content is visible to the user at a given time. Here is some more information about this CSS property:
-webkit-line-clamp MDN docs
Learn how to write better CSS with SASS:
You need to sign up for Treehouse in order to download course files.Sign up