Webcourse/03-CSS进阶/CSS开发积累.md

26 lines
327 B
Markdown
Raw Normal View History

### 让文字只显示一行,超出显示省略号
2019-11-03 14:20:08 +08:00
```
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
```
2019-11-03 14:20:08 +08:00
### 让文字最多只显示两行,超出后显示省略号
```
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
```