$('#js-list .enlist-list-name').each(function () {
var listNameContent = $(this).html(),
listNameLength = listNameContent.length;
if (listNameLength > 5) {
$(this).addClass('more-breaking active-list-name');
} else {
$(this).removeClass('more-breaking active-list-name');
}
})
.active-list-name {
line-height: .5rem;
width: 55%;
height: 100%;
}
.more-breaking {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.enlist-list-name {
width: 55%;
height: 100%;
line-height: .96rem;
}
<p class="enlist-list-name fr more-breaking active-list-name">愛新覺羅伊梓</p>