
- .box1{
- width: 200px;
- height: 30px;
- line-height: 30px;
- margin: 0 auto;
- background-color: rgba(220, 220, 220, 0.751);
- /* 单行文本超出隐藏 用省略号代替 */
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }

- .box2{
- width: 200px;
- height: 60px;
- line-height: 30px;
- margin: 0 auto;
- background-color: rgba(220, 220, 220, 0.751);
- /* 多行文本超出隐藏 用省略号代替 */
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }