css文本过多时隐藏并显示...

单行显示:

{

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}

多行显示,在chrome浏览器中

{

  display: -webkit-box;

  overflow: hidden;

  text-overflow: ellipsis;

  max-height: .65rem;

  // 注释不可缺少

  /*! autoprefixer: off */
  -webkit-box-orient: vertical;
  /* autoprefixer: on */

  -webkit-line-clamp: 3; //显示三行
}
原文地址:https://www.cnblogs.com/zxscn2013/p/9883833.html