<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS多行文字溢出省略号表示</title>
<style>
div{
width: 150px;
height: 80px;
background-color:pink;
margin:100px auto;
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>
</head>
<body>
<div>啥也不说了,此处省略一万字啥也不说了,此处省略一万字</div>
</body>
</html>
CSS多行文字溢出省略号表示
最新推荐文章于 2024-09-05 15:51:55 发布