Tailwind CSS Classes

Tailwind CSS class .truncate

<div class="w-64 bg-gray-200 m-2 truncate">
  <span>Lorem ipsum dolor sit amet,
    consectetur adipiscing elit. Pellentesque 
    justopurusulputateipsumgetsuereacilisisberoroiet pulvinar 
    felis. Vivamus ultricies rutrum, sed malesuada.
  </span>
</div>

Preview

Are you tired of writing HTML by hand?

CSS source

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

More Tailwind CSS classes in Text category

© 2024 Shuffle. All rights reserved.