How to display multiple lines in CSS and hide them

Display multiple lines and hide redundant lines

  font-size: 24rpx;
    width: 400rpx;
    white-space: normal;
    word-break: break-all;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    /* 行数 */
    -webkit-line-clamp: 2;      
    overflow: hidden;

Guess you like

Origin blog.csdn.net/m0_57611486/article/details/121451581