css单行文本溢出显示省略号
1.css
.text {
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
2.html
<div class="text">requirejs能带来什么好处requirejs能带来什么好处requirejs能带来什么好处</div>
效果: