<!DOCTYPE html>
<html>
<head>
<style type="text/css">
/* 一行 */
.test {
text-overflow:ellipsis;
overflow:hidden;
white-space:nowrap;
width:150px;
}
/* 两行 */
.test {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>
</head>
<body>
<div class="test">关于**产品的推广关于**产品的推广关于**产品的推广</div>
</body>
</html>
ellipsis 一行/两行省略
猜你喜欢
转载自blog.csdn.net/Nana_9457/article/details/83274455
今日推荐
周排行