使用text-overflow:ellipsis实现溢出文本省略号显示无需js
2018-03-07 17:05
791 查看
即设置样式 style="
text-overflow:ellipsis;
white-space: nowrap;
overflow: hidden;"
后测试成功
相比js方式不仅简便了许多而且会根据元素的宽度自适应
IE 8+,chrome 30,火狐26,测试通过.bulletin-wrapper{
padding: 0 22px 0 12px
white-space: nowrap
overflow: hidden
text-overflow: ellipsis}
text-overflow:ellipsis;
white-space: nowrap;
overflow: hidden;"
后测试成功
相比js方式不仅简便了许多而且会根据元素的宽度自适应
IE 8+,chrome 30,火狐26,测试通过.bulletin-wrapper{
padding: 0 22px 0 12px
white-space: nowrap
overflow: hidden
text-overflow: ellipsis}
相关文章推荐
- 使用text-overflow:ellipsis实现溢出文本省略号显示无需js
- 使用 text-overflow: ellipsis 实现溢出文本省略号显示
- 使用text-overflow:ellipsis对溢出文本显示省略号
- 使用text-overflow:ellipsis对溢出文本显示省略号有两个好处
- 溢出文本显示为省略号的效果及其text-overflow:ellipsis;的使用
- 溢出文本显示为省略号的效果及其text-overflow:ellipsis;的使用
- text-overflow:ellipsis,让溢出文本显示省略号
- CSS基础:text-overflow:ellipsis溢出文本显示省略号的详细方法
- text-overflow:ellipsis溢出文本显示省略号的详细方法
- text-overflow:ellipsis溢出文本显示省略号
- 使用text-overflow:ellipsis实现文字超出用省略号显示
- 溢出文本显示省略号,关于text-overflow:ellipsis的那些事
- 多行文本溢出显示省略号(…) text-overflow: ellipsis
- text-overflow:ellipsis;-moz-binding: url('ellipsis.xml#ellipsis'); 文本字符串超过容器长度溢出部分显示点点点省略号"..." ,支持IE6+,Firefox !
- CSS基础:text-overflow:ellipsis溢出文本显示省略号的详细方法_CSS教程
- text-overflow:ellipsis溢出文本显示省略号的详细方法
- text-overflow:ellipsis对溢出文本显示省略号
- 长文本溢出显示省略号(…) text-overflow: ellipsis
- text-overflow:ellipsis ,溢出文本显示省略号