-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path省略号.html
39 lines (35 loc) · 1.01 KB
/
省略号.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* 一行 */
/* div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} */
/* 多行 */
div {
width: 200px;
height: 100px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
/* 将对象作为弹性伸缩盒子模型显示 */
-webkit-line-clamp: 4;
/* 控制最多显示几行 */
-webkit-box-orient: vertical;
/* 设置或检索伸缩盒对象的子元素的排列方式 */
}
</style>
</head>
<body>
<div>
css 实现多行文本超出长度显示省略号,css 实现多行文本超出长度显示省略号,
css 实现多行文本超出长度显示省略号
</div>
</body>
</html>