gpt4 book ai didi

html - 省略号在 firefox 中运行不佳,但在 chrome 中运行良好

转载 作者:搜寻专家 更新时间:2023-10-31 22:32:01 25 4
gpt4 key购买 nike

我试图使用省略号将链接的宽度限制在一定范围内。

html 是这样的:

<a class="blueLink2 destination-url-space" style="top:0;" href="http://google.com/uyv245">http://google.com/iuh345345345gthrthrthrth</a>

CSS 是

.blueLink2 {
color: #0051A1;
display: inline;
font-size: 14px;
margin-left: 5px;
overflow: hidden;
position: relative;
text-overflow: ellipsis;
top: 0;
}
.destination-url-space {
display: inline-block;
max-width: 200px;
overflow-x: hidden;
}

但它只适用于 Chrome。在 Firefox 中不工作。演示:http://jsfiddle.net/xE6HG/

最佳答案

你需要在那里添加white-space: nowrap;

DEMO

关于html - 省略号在 firefox 中运行不佳,但在 chrome 中运行良好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14641202/

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