max-width: 2.3rem;
display:-webkit-box;
-webkit-line-clamp:1;
-webkit-box-orient:vertical;
overflow:hidden;
word-break: break-all; /* 纯数字也换行 */
但火狐,ie等浏览器不兼容此方法,所以需要另一种写法
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
或
.claRecord .yelp .ylistWrap .ylist .ycont{
font-size: 14px;
color: #444444;
margin-top: 8px;
width: 100px;
height: 40px;
line-height: 20px;
border:solid 1px black;
/* position: relative; */
/*多行文本省略*/
overflow : hidden;
text-overflow: ellipsis;
display: -moz-box;
-moz-line-clamp: 2!important;
-moz-box-orient: vertical;
/*! autoprefixer: off */
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.claRecord .yelp .ylistWrap .ylist .ycont:after {
background: linear-gradient(to right, rgba(255, 255, 255, 0), #FFFFFF 50%) repeat scroll 0 0 rgba(0, 0, 0, 0);
bottom: 0;
content: "...";
padding: 0 5px 1px 30px;
position: absolute;
right: 0;
}