Home > Article > Web Front-end > css implements text overflow and display ellipses without wrapping
How to implement css text without line wrapping and displaying ellipses over overflow: first open the css style sheet; then use the attribute "white-space: nowrap;" to force the text to not wrap; then use "text-overflow:ellipsis;" Just implement text overflow and display ellipses.
Recommended: "css video tutorial"
1. Not mandatory Line wrap
white-space: nowrap; The text is forced not to wrap;
text-overflow:ellipsis; The text overflows and displays ellipsis;
overflow:hidden; Hide the overflow part;
2. Automatic line wrapping
word-wrap: break-word;
word-break: normal;
3. Force English word line break
word-break: break-all;
The above is the detailed content of css implements text overflow and display ellipses without wrapping. For more information, please follow other related articles on the PHP Chinese website!