text-overflow:省略号在IE上不起作用

问题描述 投票:28回答:3

this页面中,左侧边栏上有一些链接被裁剪:

.widget-area .textwidget li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

在Firefox / Chrome中,它显示正确:

不幸的是Internet Explorer 8/9/10 ...:

问题不是IE 10支持文本溢出:省略号..例如this也适用于IE 10!我的实施有什么问题?我还尝试添加-ms-text-overflow:省略号,没有任何运气。

css internet-explorer overflow css3
3个回答
40
投票

删除word-wrap: break-word属性应该有所帮助。


2
投票

添加宽度属性到您的CSS代码..这将有所帮助..


0
投票

对于IE你应该添加一些额外的代码..比如改变你的宽度属性..或尝试使用dotdotdot jquery插件..这将是一个替代解决方案..像这样

http://dotdotdot.frebsite.nl

编辑:点击此链接

Quirksmode textoverflow

它告诉你设置宽度:IE为100%..

© www.soinside.com 2019 - 2024. All rights reserved.