/*一行溢出*/
.box1{ width:100px; white-space:nowrap; overflow: hidden; text-overflow: ellipsis; } /*两行溢出(有时候不起作用,给固定高度)*/ .box2{ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/*一行溢出*/
.box1{ width:100px; white-space:nowrap; overflow: hidden; text-overflow: ellipsis; } /*两行溢出(有时候不起作用,给固定高度)*/ .box2{ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }