省略号在Firefox中运行不正常,但在chrome中运行

use*_*181 3 html css ellipsis

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

html是这样的:

<a class="blueLink2 destination-url-space" style="top:0;" href="http://google.com/uyv245">http://google.com/iuh345345345gthrthrthrth</a>
Run Code Online (Sandbox Code Playgroud)

而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;
}
Run Code Online (Sandbox Code Playgroud)

但它仅适用于Chrome.在Firefox中不起作用.演示:http://jsfiddle.net/xE6HG/ 请帮帮我.

Sow*_*mya 7

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

DEMO

  • 添加`white-space:nowrap;`对我不起作用。 (2认同)