Very long English, if you want to display two lines in
Try using javascript to cut the string
css There is a similar function in , but it doesn’t seem to work well in td
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width:150px ;
Your css can only display one line and omit it. I am now using js to insert
to achieve it, but the limitation is very big. When the width of the div changes, it will be troublesome
<style type="text/css"> td { font-size: 12px; overflow: hidden; padding-left: 5px; text-align: left; text-overflow: ellipsis; white-space: nowrap; word-break: break-all; } table { table-layout: fixed; } </style>
Moderator, you are just displaying one line and omitting
Moderator, you are just displaying one line and omitting
You Want to display multiple lines and omit them? The characters will wrap automatically
Generally, ellipses are only displayed on one line. If there are multiple lines, you can refer to this plug-in
http://tpgblog.com/2009/12/21/threedots- the-jquery-ellipsis-plugin/
Thank you moderator, this plug-in is exactly what I want