gpt4 book ai didi

css - 文本溢出 : ellipsis is not working on IE10

转载 作者:行者123 更新时间:2023-11-28 13:13:42 25 4
gpt4 key购买 nike

p.details {
font-size: 12px;
color: #6D6D6D;
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
max-height: 3.6em;
line-height: 1.8em;
min-height: 3.6em;
}

上述 css 在 chrome、firefox、safari 上工作正常,IE10 除外。如果它太长,它应该在句子后面有一个“...”。

例如:“这些是……的详细信息”而不是“这些是促销元素的详细信息”

请帮忙!

新更新:我删除了 word-wrap: break-word 并且它适用于第一行。后续行将不起作用。例如:

<p class = "details">"- Sentence 1" <br> "- Sentence 2" </p>

这将产生:

森腾...
句子

最佳答案

从您的样式中删除以下行:

word-wrap:     break-word;

关于css - 文本溢出 : ellipsis is not working on IE10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18287484/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com