<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.pa{
/*单行文本省略*/
/*width: 200px;*/
/*display: block;*/
/*white-space: nowrap;*/
/*overflow: hidden;*/
/*text-overflow: ellipsis;*/
/* 多行文本省略*/
width: 200px;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp:2
}
</style>
</head>
<body>
<span class="pa">
测试服方钢管测试服方钢管测试服方钢管测试服方钢管测试服方钢管测试服方钢管sdfsaggsag
</span>
</body>
</html>
单行文本省略图片
多行文本省略图片