I use this webkit line clamp, it works in Chrome, but not in Firefox. The following is the code:
{
overflow: hidden;
text-overflow: ellipsis;
display: -we
/----line clamp---/
.line-clamp {
position: relative;
height: 2.7em;
overflow: hidden;
}
.line-clamp:after {
background: $white;
bottom: 0;
position: absolute;
right: 0;
float: right;
content: '\2026';
margin-left: -3rem;
width: 1rem;
}
@supports (-webkit-line-clamp: 2) {
.line-clamp {
display: -webkit-box;
-webkit-line-clamp: 2;
/ autoprefixer: off /
-webkit-box-orient: vertical;
/ autoprefixer: on /
max-height:3.6em;
height: auto;
}
.line-clamp:after {
display: none;
}
}
/----line clamp end---/