Answers for "truncate text css with dots"

CSS
8

truncate text css

.element{

  text-overflow: ellipsis;

  /* Required for text-overflow to do anything */
  white-space: nowrap;
  overflow: hidden;
}
Posted by: Guest on May-14-2020
0

truncate and add dots

const truncate = (input) => input.length > 5 ? `${input.substring(0, 5)}...` : input;
Posted by: Guest on November-13-2021

Browse Popular Code Answers by Language