jsfiddle代码:https ://jsfiddle.net/JaneChen/gu7tf864/1/
<span class="fileName" >long name file to display long name file to displayddddddssdd moreggggg lines more lines more more more lines</span>
.scss:
.fileName {
@font-size: 17px;
@line-height: 1.3;
@lines-to-show: 3;
-webkit-font-smoothing: antialiased;
-webkit-line-clamp: 3;
display: inline-block;
overflow:hidden;
display: -webkit-box;
text-overflow: ellipsis;
width: 175px;
font-size: 17px;
line-height: 1.4;
max-height: 71.4px;
}
文本块显示为3行,但是当文本被截断时,省略号不显示。这是为什么 ?有没有办法解决?谢谢!
你忘了
-webkit-box-orient: vertical;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句