This time I will show you how to make the text automatically hide and display the ellipsis after it exceeds the div, and how to automatically hide and display the ellipsis after the text exceeds the div. one time. After the text exceeds the div, it will be automatically added...
Just set the following style in css:label{ width: 25px; //必须设定宽度 overflow: hidden; text-overflow: ellipsis; //设置文字溢出时 white-space: nowrap; word-break: keep-all; }
Recommended reading:
Detailed explanation of css3 shadowJavaScript array usage collectionHow to use canvas to draw the starry sky, moon, earth, and add text
##How to use canvas to draw arcs and circles
The above is the detailed content of How to make text automatically hide and display ellipses after it exceeds the div. For more information, please follow other related articles on the PHP Chinese website!