1 <style type="text/css">
2 .table{table-layout:fixed}
3 .table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap搜索}
4 </style>
5 <table width="200" border="1" class="table">
6 <tr>
7 <td>AAAAAAaaaaaaaaaaaaaaaaaaaaAAAAAAAAA</td>
8 <td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</td>
9 <td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</td>
10 </tr>
11 </table>
可以实现,但是用的是-webkit-私有属性。我用js已经解决了。代码如下:
text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;
100px;
white-space:nowrap;
word-break:keep-all;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden;