Prerequisites things, div must be limited to the width, height, need to use the height and line-height were blended to achieve the first, the excess will be hidden ability.
Single-line display
overflow: hidden; / * on the part of the container beyond forcibly taken, highly uncertain line feed * / text-overflow: ellipsis; / * display omitted pruned symbols to represent text. * / White-Space: nowrap; / * prohibition wrap * /
Multi-line display
overflow: hidden; the display: -webkit-Box; -webkit-Box-Orient: Vertical; text-overflow: ellipsis; -webkit-Line-CLAMP: 2; / * limit the number of rows of 2 rows * / Line-CLAMP: 2 ; / * limit the number of rows of 2 rows * /