溢出省略

版权声明:111 https://blog.csdn.net/qq_42897782/article/details/87794361
/*溢出省略一行 */
.ellipsis{
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}

/*溢出省略两行 */
.ellipsis2{
  display: -webkit-box;  /** 对象作为伸缩盒子模型显示 **/
  -webkit-box-orient: vertical;  /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  -webkit-line-clamp: 2;  /** 显示的行数 **/
  overflow: hidden;  /** 隐藏超出的内容 **/
}

猜你喜欢

转载自blog.csdn.net/qq_42897782/article/details/87794361
今日推荐