yangchin9

前提条件是所引用的元素是块级元素,因为使用了WebKit的CSS扩展属性,该方法适用于WebKit浏览器及移动端

单行溢出处理:

.text-overflow{
    overflow: hidden;    
    text-overflow:ellipsis;    
    white-space: nowrap;
}

多行溢出处理:

.text-overflows{
    display: -webkit-box;    
    -webkit-box-orient: vertical;    
    -webkit-line-clamp: 3;    
    overflow: hidden;
}

 

分类:

技术点:

相关文章:

  • 2022-01-07
  • 2021-11-05
  • 2021-11-15
  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
猜你喜欢
  • 2021-12-22
  • 2021-11-05
  • 2021-11-05
  • 2021-11-22
  • 2021-12-04
相关资源
相似解决方案