Method: First use the "overflow:hidden" statement to set the content to be hidden after it exceeds the limit; then use the "text-overflow:ellipsis" statement to set the content to be displayed as an ellipsis when it exceeds the limit; finally use "white-space:nowrap" statement, just set the text without line breaks.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Create a new html page, find the
tag on the html code page, create atag in the
tag, then enter the displayed content and add a class class as class= "cont". Find theThe above is the detailed content of How to set text beyond the ellipses in css. For more information, please follow other related articles on the PHP Chinese website!