css实现文本缩略显示
转载自http://blog.csdn.net/mushui0633/article/details/65685655
单行:
对应的css中加入
1
2
3
|
overflow
:
hidden
;//超出一行文字自动隐藏
text-
overflow
:ellipsis;//文字隐藏后添加省略号
white-space
:
nowrap
;//强制不换行
|
多行:
display: -webkit-box; word-break: break-all; text-overflow: ellipsis; font-size: 32rpx; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp:2;
转载自http://blog.csdn.net/mushui0633/article/details/65685655
分类:
CSS布局