1.单行文本溢出
el{
width: xxx;
/* 溢出省略...三件套 */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2.多行文本溢出处理
- 后端返回合适的文本(固定字数、符号等)
- 前端进行截断
el{
/* 只显示五行 */
height: 100px;
line-height: 20px;
overflow: hidden;
}
1.单行文本溢出
el{
width: xxx;
/* 溢出省略...三件套 */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2.多行文本溢出处理
el{
/* 只显示五行 */
height: 100px;
line-height: 20px;
overflow: hidden;
}