Small micro-channel program text exceeds ellipsis

If the container has a fixed width, by adding the following code.

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

Should the container need not have a fixed width and height, simply add the following code.
Without specifying the height, simply specify up to display a few lines, property -webkit-line-clamp.
Up to the present example, 3 lines, beyond the line 3, the display ellipses instead of at the end of the third line.

view {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

Ps: textarea tag does not support

Guess you like

Origin blog.csdn.net/qq_42363090/article/details/92830520