Last active
November 28, 2020 21:54
-
-
Save krabello/f21e48d5dff9d066446ad1d8e7fce07a to your computer and use it in GitHub Desktop.
Line Clamp Example
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
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
.clamp { | |
-webkit-line-clamp: 2; | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
overflow: hidden; | |
word-break: keep-all; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="post"> | |
<h2>Heading Post</h2> | |
<p class="clamp">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard | |
dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen | |
book. It has survived not only five centuries, but also the leap into electronic typesetting.</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment