After the text displays a single line or multiple lines, it is hidden beyond the display ellipsis

basic attributes

overflow:hidden; //Exceeded text hidden

text-overflow:ellipsis; //Overflow is displayed with ellipsis

white-space:nowrap; // overflow does not wrap

Multi-line display setting properties

display: -webkit-box; //Display the object as a flexible box model.

-webkit-box-orient: vertical; //Arrange sub-elements vertically from top to bottom (set the sub-element arrangement of the stretch box)

-webkit-line-clamp: 2;//Display two lines

Guess you like

Origin blog.csdn.net/weixin_51412569/article/details/129561185