text-overflow:ellipsis
这个css只对单行有效,对多行文本无效。一般需要服务端根据文本长度截取才能实现。不过无意中在网上找到下面的代码(html+css),参考一下。
<div style="position:relative; width:200px; height:40px; line-height:20px; overflow:hidden; z-index:1;">
文字部分文字部分文字部分文字部分文字部分文字部分文字部分文字部分文字部分文字部分文字部分文字部分文字部分
<div style="position:absolute; right:0; bottom:0; z-index:10; background-color:#FFFFFF;">...</div>
</div>