省略号不能在Firefox中正常工作,但可以在Chrome中工作 [英] Ellipsis not working well in firefox but works in chrome

查看:53
本文介绍了省略号不能在Firefox中正常工作,但可以在Chrome中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用省略号将链接限制为一定宽度.

I was trying to make a link restricted to a width using the ellipsis.

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/

But it's working only in Chrome. Not working in Firefox. Demo: http://jsfiddle.net/xE6HG/

推荐答案

您需要在其中添加 white-space:nowrap;

演示

DEMO

这篇关于省略号不能在Firefox中正常工作,但可以在Chrome中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆