多行文本溢出省略

不换行文本溢出省略

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

多行文本溢出省略

.text {
						-webkit-box-orient: vertical;	/* 设置垂直排列 */
						-webkit-line-clamp: 3;		/* 设置行数 */
						overflow: hidden;				/* 设置超出省略 */
						text-overflow: ellipsis;		/* 设置省略以...结尾 */
						}

你可能感兴趣的:(多行文本溢出省略)