html - 溢出 :hidden dots at the end in 2 line paragraphs

标签 html css

<分区>

此代码显示一行代码,然后给出三个点。 示例:

The Alsos Mission was an Allied unit formed to ...

我要两三行然后三点

例子:

  The Alsos Mission was an Allied unit formed to 
  investigate Axis scientific developments ...

div{
  width : 500px;
  overflow:hidden;
  display:inline-block;
  text-overflow: ellipsis;
  white-space: nowrap;
}
<div>
    The Alsos Mission was an Allied unit formed to investigate Axis scientific developments, especially nuclear, chemical and biological weapons, as part of the Manhattan Project during World War II. Colonel Boris Pash, a former Manhattan P
</div>

最佳答案

也许它可以工作!

div { 最大宽度:75ch;//人物 }

div:after { 内容: ”...” }

关于html - 溢出 :hidden dots at the end in 2 line paragraphs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49475613/

上一篇:html - 导航菜单中的间距 (HTML/CSS)

下一篇:php - 为什么我的 bootstrap 导航栏在 bootstrap 4 中不显示内联?

相关文章:

html - `overflow`属性 `overlay`和 `scroll`有什么区别

jquery - 页面滚动后div需要屏幕垂直居中

javascript - 在选中的复选框上将字体粗细更改为粗体

jquery - 我在单击事件时使用 jquery 更改 fa-thumbs-up 图标颜色时遇到问题

javascript - 如何防止 Bootstrap 下拉子菜单单击关闭父下拉菜单

html - 使用 HTML/CSS 创建显示描述的卡片时出现问题

html - 向左浮动图像,适合父级,保持纵横比

html - 容器填充问题(出现滚动条)

html - Bootstrap 4.1 之间的 float 标识

javascript - PHP include != JS 加载