Friends

多行文字截断-webkit-line-clamp

<!--有一定浏览器兼容性问题-->
<style>
.content{
    overflow : hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
</style>
<div class="content">
    -webkit-line-clamp is an unsupported WebKit property that limits the number of lines of text displayed in a block element. In order to achieve the effect, it needs to be combo-ed with a couple of other exotic WebKit properties.
</div>
Written on September 18, 2015