html - text-overflow : ellipsis working on IE11 Win7 but not IE11 Win8, 这是已知行为吗?

标签 html css twitter-bootstrap kendo-ui

我有史以来第一次不得不使用 text-overflow: ellipsis 属性(使用 Bootstrap 和 Kendo 的 ASP.MVC 4 应用程序)。一切都按预期工作,除了当我在运行 IE11Win 8.1 机器上查看页面时,长文本根本没有被截断,因此布局变得 splinter 的。问题是,当我在我的开发机器 (Win 7) 上查看 IE11(相同版本)上的同一页面时,它可以完美运行。它在 Chrome 和 Firefox 中也能正常工作。

我尝试设置和删除其他属性(white-space: nowrapoverflow: hiddenms-text-overflowwidth, display: block) 无济于事,没有任何改变这种差异。我在两台机器上测试了 Win 8 的行为,都显示了这一点。这是一个已知的错误? Win7/8 的 IE11 版本真的不同吗?如果不是,可能是什么原因造成的?与 Win8 唯一不同的是,Win 8 机器远程调用该站点,它在 Win 7 机器上本地运行。

最佳答案

要使用一个简单的示例,请尝试

http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_js_text-overflow

在 Chrome 中,使用 text-overflow:ellipsis 使所有 4 行都以省略号结尾。

在 IE11(Windows8.1 下)中,只有第一行有省略号。

评论 text-overflow:ellipsis doesn't work on IE指出“注意:如果文本前面有 <br>,IE11(可能低于此版本)将无法使用此内容!”

关于html - text-overflow : ellipsis working on IE11 Win7 but not IE11 Win8, 这是已知行为吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22617426/

相关文章:

javascript - 在 Bootstrap Carousel 中滑动图像并排

html - CSS内联 block 横向滚动

javascript - Bootstrap 选项卡式 Pane 不起作用

javascript - 如何使用 webpack 将 html、js 和 css 打包到一个 html 文件中?

在 chrome 中包含 html5 视频时的 css 悬停问题

css - 如何将Highchart的字体系列更改为Bootstrap css默认字体系列

html - Bootstrap 网格定位

css - 谷歌图表 : How to add class to column of table?

javascript - HTML INPUT RANGE - 禁用提交,直到发生更改

html - input 的边框比 div 的边框更细