Css 省略号对几个词不起作用
我有以下css的省略号。它只适用于少数文本。但对于少数文本,它不起作用 注意-这是两行的 请帮忙Css 省略号对几个词不起作用,css,Css,我有以下css的省略号。它只适用于少数文本。但对于少数文本,它不起作用 注意-这是两行的 请帮忙 .myclass { max-width: 210px; width: 290px; height: 3em; min-height: 3em; overflow: hidden; text-overflow: ellipsis; overflow: hidden; display: block; } 使用以下代码 <
.myclass {
max-width: 210px;
width: 290px;
height: 3em;
min-height: 3em;
overflow: hidden;
text-overflow: ellipsis;
overflow: hidden;
display: block;
}
使用以下代码
<div class="myclass">Lorem Ipsum is simply dummy text of the printing and
typesetting industry.</div>
<style>
.myclass {
max-width: 250px;
min-height: 3em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
Lorem Ipsum只是印刷和印刷的虚拟文本
排版业。
.myclass{
最大宽度:250px;
最小高度:3em;
溢出:隐藏;
文本溢出:省略号;
空白:nowrap;
}
你能制作代码片段吗?“它对少数文本有效。但对少数文本无效。”没有任何意义,因为我的文本都很长。当它转到第二行时,省略号不起作用。也许你应该试试这个。。。