1.元素超出宽度,给元素隐藏并且显示…
.flex-ac .pbr{
width: 150rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1152B5;
line-height: 24rpx;
text-decoration:underline;
display:block;
word-break:keep-all;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
2.给元素宽度100% 的情况,超过指定行数用…展示
.leftbox2 {
font-size: 30rpx;
line-height: 48rpx;
max-width: 100%;
font-weight: bold;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
font-weight: bold;
}