段落只显示2行 和flex结构

 1 .text-top{
 2   font-family: MicrosoftYaHei;
 3   font-size: 0.24rem;
 4   line-height: 0.4rem;
 5   letter-spacing: 0.01rem;
 6   color: #666;
 7   overflow: hidden;
 8   text-overflow: ellipsis;
 9   display: -webkit-box;
10   -webkit-line-clamp: 2;
11   -webkit-box-orient: vertical;
12   margin-bottom: .3rem;
13 }
14 .showall {
15   -webkit-line-clamp:inherit;
16 }
1 /*主要的代码:*/ 
2 overflow: hidden;
3 text-overflow: ellipsis;
4 display: -webkit-box;
5 -webkit-line-clamp: 2;
6 -webkit-box-orient: vertical;
1 display: flex;
2  flex-direction: column;
3   4rem;
4  justify-content: flex-end;display: flex;
5       
原文地址:https://www.cnblogs.com/gongxiaoyan/p/13576244.html