Home > Article > Web Front-end > Long string becomes omitted css_html/css_WEB-ITnose
Very long English, if you want to display two lines in b6c5a531a458a2e790c1fd6421739d1c or dc6dce4a544fdca2df29d5ac0ea9906b, it will be omitted, such as:
Ford acolytes hauled the paper before the Ontario Press Council, charging that the Star's use of unnamed sources was unethical and that the media's focus on the issue was detrimental to the democratic life of the city.
in td becomes
Ford acolytes hauled the paper
before the Ontario Press Council...
How can I do it easily with CSS?
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 0c6dc11e160d3b678d68754cc175188a 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
84a5a12742c1f6c04f7dbff8a1ff53ba
dc6dce4a544fdca2df29d5ac0ea9906bAutomatically wrap Automatically wrap Automatically wrap Automatically wrap Automatically wrap Automatically wrap Automatically wrap Automatically wrap16b28748ea4df4d9c2150843fecfba68
16b28748ea4df4d9c2150843fecfba68
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