如果只显示一行,则可以使用以下方法: overflow: hidden; text-overflow:ellipsis; white-space: nowrap; 如果需要显示 ...
1 ...
.title{ font-size: .7rem; line-height: 1.5rem; overflow: hidden; /** 隐藏超出的内容 **/ word-break: break-all ...
先看看最简单的,利用 text-overflow:ellipsis 实现单行文本溢出显示省略号效果 效果如下: 所有主流浏览器都支持 text-overflow 属性。但这个属性仅适用于单行文本,多行的情景远比单行复杂。 1.利用 ...
overflow: hidden; text-overflow:ellipsis; white-space: nowrap;限制行数 overflow: hidden; t ...
*/}.css2 { overflow: hidden; /*自动隐藏文字*/ text-overflo ...
.view-text{ /** a.设置inline-block 属性 b.强制不换行 c.固定宽度 d.隐藏超出部分 e.显示“……” */ display: inline-block; white-space: nowrap; width: 100 ...