/*一行溢出*/
.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; }
标签:两行,text,一行,webkit,ellipsis,overflow,溢出 From: https://www.cnblogs.com/txdtxd/p/17856332.html