超出宽度换行,超出高度显示省略号
作者:互联网
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>CENTER</title>
<style>
.box {
width: 100px;
height: 100px;
background-color: blueviolet;
display: flex;
justify-content: center;
align-items: center;
}
.child {
max-width: 50px;
background-color: white;
word-break: break-all;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div class="box">
<div class="child">
172839717283971728397172839717283971728397172839717283971728397
</div>
</div>
</body>
</html>
标签:box,省略号,width,换行,100px,break,color,超出,webkit 来源: https://www.cnblogs.com/hikki-station/p/16116163.html