"Truncating Multiple Line Text (crop, clampin)"
Bootstrap 3.3.0 Snippet by iwebdesigner

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Truncating Multiple Line Text <small>(crop, clampin)</small></h2> </div> <div class="row"> <div class="col-lg-3"> <div class="thumbnail"> <img src="http://placehold.it/250x150" alt="Image"> <div class="caption"> <h3 class="crop-text-2">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</h3> <p class="crop-text-1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since.</p> </div> </div> </div> </div> </div>
.crop-text-1 { -webkit-line-clamp: 1; overflow : hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; } .crop-text-2 { -webkit-line-clamp: 2; overflow : hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; }

Related: See More


Questions / Comments: