- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
例如我有一个特定高度的段落。我希望所有超过那个高度的东西都变成省略号(...),而不是像图片中那样将句子切成两半:
我试过使用 text-overflow: ellipses 但没用。请帮我解决这个问题。谢谢!
最佳答案
试试这段代码
div{display:block;width:300px;text-overflow:ellipsis;;overflow-y:scroll;max-height:200px;
display: -webkit-box;
-webkit-line-clamp: 7;
-webkit-box-orient: vertical;
}
<div>this is text this is text this is textthis is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text</div>
关于html - 文本溢出问题 : ellipses in a specific height paragraph,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42313424/
我试图理解 float 行为,所以我在下面写了简单的两段。 float:none 的第二段似乎“包含/包围”float:left 的第一段。 有人请帮助我理解这是为什么。 first parag
我正在尝试补偿我的所见即所得,当不属于其他内容的段落时,它会用段落标记围绕单个图像。这打破了我的花车。我想删除包含仅 单个 图像的段落标记,并且仅当图像在 img 标记中具有内联 css float
目前,有一个 header 标签附加了其内容。我需要将标题与其内容分开,方法是将它们维护在单独的段落标签中。 block_tag = 1.1 Header Information. Content
尝试在 TextView 中呈现文本时出现以下错误 java.lang.RuntimeException: PARAGRAPH span must start at paragraph boundar
我需要计算线程转储中相同子段落的数量。我无法使用 sed 提取每个分段的第 2 行至第 n+1 行。 awk 也可以使用 例如,给定以下示例 threaddump.txt "RMI TCP Accep
想实现段落滑动这样的功能(不知道段落滑动怎么解释) 所以我只是把它放在网站上让你看看(可能需要一段时间才能进入) https://grayraven.tw/ 像这样一个接一个 我试过自己写,写完后没有
我在 Joomla (1.5) 网站上有几篇文章。这些文章是公开的——无需注册即可查看其内容。 我想在其中一些文章中添加一个段落(即自定义 HTML)(每篇文章的段落都不同),并且我希望该段落仅对注册
在 Liquid ,我知道你可以做到{% 内容 | truncate:64 %} 截断 64 个字符和 {% content | truncatewords:100 %} 截断 100 个单词,但是有
我有一个框,其中文本以跨度显示。我使用 line-height 来更改部分内的间距,但部分之间需要有不同的距离。 请参阅本页的橙色框: https://theslowroad.org/category
我正在编写 python 代码,但我正面临一个令人讨厌的问题 {和 }移动键:段落的vim定义是“由空行分隔的块”。 但是,当我在 python 中编写一个类时,我喜欢保持方法之间的缩进,所以有没有一
有时希望将段落中的每个句子放在单独的行上。例如,这使得区分大文本文档变得更容易,因为一个句子的变化不会影响整个段落。一些标记系统(例如 *roff)还要求每个句子都从新行开始。 有没有办法,例如明智地
考虑这个word文档: 现在,下面的代码应该插入一个新段落,并使其成为选定的段落。 Sub Macro1() Dim p As Paragraph Set p = A
我正在尝试对从文档中提取的一些段落编号进行排序。 不幸的是,它们不是真正的小数,因此标准sort函数不起作用。例如,我想要以下结果: ["3.1","3.2","3.11"] NOT ["3.1","
在 emacs 中,您可以使用 meta-q “fill-paragraph”,在 vim 中您可以使用 gq - 重新格式化段落 (gggqG填充整个缓冲区) Sublime Text 中有类似的按
我知道如何使用来定义摘录的结尾,但我也想省略帖子的第一段。 如何做到这一点? 提前感谢大家! 最佳答案 刚刚遇到同样的问题。我有一个单独的摘录位置,下面我想要没有摘录的帖子(因为它已经显示)。对我有用
我想加载大的 .rtf 文件并滚动到其中的特定段落。 所以我做了这样的事情: private FlowDocument GenerateDocument(string path) {
我想使用 jQuery 将 doSomething() 应用于第一段的每个链接。这是我尝试过的: var firstParagraph = $("p").eq(0); firstParagraph.$
头等舱: public class Pets { // Instance variables private String name; private int age;
所有网页设计师... 我想显示一个字符并在它后面缩进一个段落 - 就像这里的图表一样: http://dl.dropbox.com/u/43015072/indent.jpg 诀窍是,我想在没有以下情
我想在点击每个“p”标签时单独关注它,就像输入上的 CSS“焦点:”一样。问题是选择器“focus”对段落不起作用,这里是一个例子: HTML Some Content 1 Some
我是一名优秀的程序员,十分优秀!