multi-line-ellipsis
v1.0.4
Published
a multi-line-ellipsis library
Downloads
7
Readme
multi-line-ellipsis
a multi-line-ellipsis library
demo
说明
解决单行或多行文本溢出时,最后一行的末尾显示省略号(...) 或 加上特殊文字(查看详情)等 跟 css 方法比起来,这个纯 js 方法,没有兼容性问题,后面添加的文字可以任意设置样式。
使用前必读:
- 容器必须设置了 line-height
- 整个容器内的元素只能包含文本和内联元素,且 line-height 必须一致。