width does not set the default width to cover the full screen, if you want to realize the width adapts to the length of the text, css
width:fit-content;
If you want to realize automatic text wrapping, display up to three lines, beyond the display of ellipsis, the following effect
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;