1,html
<p>我有很多文字 我有很多文字 我有很多文字 我有很多文字 我有很多文字 我有很多文字 </p>
2,css
display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; //两行文字省略 text-overflow: ellipsis; -webkit-box-orient: vertical;