Why webkit line clamping does not work in firefox?

前端 未结 4 1857
轮回少年
轮回少年 2021-02-07 01:15

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         


        
4条回答
  •  野的像风
    2021-02-07 01:39

    {
        overflow:hidden;
        text-overflow: ellipsis;    
        display: -webkit-box;    
        -webkit-line-clamp: 3;
        /* number-of lines */    
        -webkit-box-orient: vertical; 
        word-wrap:break-word;    
        line-height:1.2; 
        /* line-height for 1line*/    
        max-height:3.6rem; 
        /* line-height * 3*/
    }
    

    it works fine with chrome, ff, ie, edge

提交回复
热议问题