HTML部分:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="./index.css" />
<title>单行文本超出省略</title>
</head>
<body>
<div class="container">
<div class="title">
如何评价罗永浩 2019 年 12 月 3
日举办的「老人与海」黑科技发布会?是否达到了你的预期?
</div>
<div class="txt">
罗永浩的「老人与海」黑科技发布会于 12 月 3 日 19:30
正式举行,这场发布会罗永浩发布了什么?是否达到了你的预期?
</div>
</div>
</body>
</html>
CSS部分:
.container .title {
color: #1a1a1a;
font-size: 18px;
line-height: 28px;
font-weight: 600;
margin-bottom: 10px;
}
.container .txt {
color: #444;
font-size: 15px;
white-space: nowrap;
}