page { background: #f6f6f6; } .top { background: #ffffff; } .list { margin: 30rpx; padding: 30rpx; background: #ffffff; border-radius: 20rpx; .list-box { display: flex; .list-image { width: 240rpx; height: 180rpx; margin-right: 20rpx; } .meal { width: 58%; .meal-name { height: 90rpx; width: 100%; overflow: hidden; //一定要写 text-overflow: ellipsis; //超出省略号 display: -webkit-box; //一定要写 -webkit-line-clamp: 2; //控制行数 -webkit-box-orient: vertical; //一定要写 } .meal-price { color: red; font-size: 28rpx; margin-top: 10rpx; } .meal-time { font-size: 30rpx; margin-top: 10rpx; } } } .operation { display: flex; justify-content: flex-end; margin-top: 20rpx; .operation-delete { border-radius: 20rpx; border: 1rpx solid #BBBBBB; padding: 20rpx 50rpx; margin-left: 20rpx; } } }