<!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;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div>啥也不说了,此处省略一万字</div>
</body>
</html>
CSS单行文字溢出省略号表示
最新推荐文章于 2024-01-02 17:04:47 发布