Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

CSS - Truncate multi-line text with ellipsis

0 votes
30 views
added Aug 16, 2017 in CSS by birdygeek Sergeant (2,060 points)
edited Feb 11 by LC Marshal
.ellipsis {
  display: block;
  display: -webkit-box;
  max-width: 400px;
  height: 109.2px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.625;
}

/*or */

.ellipsis {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...