【问题标题】:Epllisis not working in IE [duplicate]Elllisis 在 IE 中不起作用 [重复]
【发布时间】:2015-04-08 21:29:42
【问题描述】:

我有一个表格,如果文本更大,我添加了内联 css 来显示点。它在除 IE9 之外的其他浏览器中工作正常

下面是我的代码

<table class="table table-bordered table-condensed hardware-software-table">
                            <tbody><tr style="background-color: #8A8A8D; color: #fff;">
                                <th style="width: calc(100% - 10px);overflow: hidden;text-overflow: ellipsis; white-space: nowrap;">VendorName</th>
                                <th style="width: calc(100% - 200px);overflow: hidden;text-overflow: ellipsis; white-space: nowrap;">Account No</th>
                            </tr>
                            <tr>
                            <td>1</td>
                            <td>2</td>

                        </tbody></table> 

也请看截图

【问题讨论】:

  • 我不认为这是一个编程问题。这真是一个关于如何使用工具的问题 - Eclipse。

标签: css


【解决方案1】:

你必须在你的 html 中做一些改变。为了获得更好的性能,您可以在 th 中使用 span 标签,它可以正常工作并定义 span 标签的宽度。

<table class="table table-bordered table-condensed hardware-software-table">
                            <tbody><tr style="background-color: #8A8A8D; color: #fff;">
                                <th><span style="width: 100px;overflow: hidden;text-overflow: ellipsis; white-space: nowrap; display:block;"">VendorName aASDASDASD</span></th>
                                <th ><span style="width: 100px;overflow: hidden;text-overflow: ellipsis; white-space: nowrap; display:block;"">Account Number</span></th>
                            </tr>
                            <tr>
                            <td>1</td>
                            <td>2</td>

                        </tbody></table> 

【讨论】:

    猜你喜欢
    • 2012-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-04
    • 2013-08-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-24
    相关资源
    最近更新 更多