顺晟科技
2022-09-15 20:26:27
196
<style type="text/css">
.text-overflow
{
display:block;/**//*内联对象需加*/
width:31em;
word-break:keep-all;/**//* 不换行 */
white-space:nowrap;/**//* 不换行 */
overflow:hidden;/**//* 内容超出宽度时隐藏超出部分的内容 */
text-overflow:ellipsis;/**//* 当对象内文本溢出时显示省略标记(
) ;需与overflow:hidden;一起使用。*/
}
</style>
Html 使用代码(GridView 等数据控件也对应Html使用)
<table class=text-overflow style="table-layout: fixed; width: 222px;">
<tr>
<td style="width: 20; word-break: keep-all; white-space: nowrap; overflow: hidden;
text-overflow: ellipsis;">
这里是过长的问题这里是过长的问这里是过长的问题 </td>
</tr>
</table>
25
2022-09
15
2022-09
15
2022-09
15
2022-09
15
2022-09
15
2022-09