Long content

overflow-wrap

overflow-wrap: normal allows content to push or overflow specified container boundaries

The break-word content is wrapped inside the boundary. Interrupts are allowed inside the word if needed

hyphens

Tells the browser how to use a hyphen to concatenate words on a newline. You can block the hyphen completely, control when the browser uses it, or let the browser decide when to use it.

登 记 : None The word is not interrupted when moving towards a line break, even when the character within the word is suggested to have a line break point. Lines are only newlines at whitespace. Manual does line wrapping only when characters in a word suggest line wrapping. auto

Article truncation

Truncation: Add dots and dots at the end of sentences to omit more text {white-space: nowrap overflow: hidden text-overflow: ellipsis} white-space: normal default. White space will be ignored by the browser. Pre white space will be preserved by the browser. Nowrap text will not wrap and continue on the same line until it hits the BR tag. Perform normal pre-line wrap to merge white space, preserve overflow: visible hidden Scroll auto TEXT-overflow: clip ellipsis

Multi-line text truncation processing

For this to work, you must use display: -webkit-box. -webkit-line-clamp Specifies the maximum number of lines for truncation work.

line-clamp: You can limit the contents of a block container to a specified number of lines

It can only be set to -webkit-box or -webkit-inline- if the display property is set to -webkit-inline-

Box only works if the -webkit-box-orient attribute is set to verticalThe downside of this technique is that it’s easy to fail if you want to add padding to an element. When padding is added, it causes a portion of the next line to be displayed, which should be truncated. See below: