【问题标题】:How to prevent linebreaks in bootstrap tables in mircosoft edge?如何防止 microsoft edge 中的引导表中的换行符?
【发布时间】:2022-08-02 15:12:30
【问题描述】:

我有一个带有时间戳的简单表。 如果将浏览器宽度缩小到 <600 像素,则会出现底部滚动条,以便您可以左右移动表格,但列是不是分成多行。

http://jsfiddle.net/9651rn0k/3/

<div class=\"container\">
    <table class=\"table table-hover table-striped table-sm\">
        <thead>
            <tr>
                <th scope=\"col\">
                    <div>id</div>
                </th>
                <th scope=\"col\">
                    <div>fileTimestamp</div>
                </th>
            </tr>
        </thead>

        <tbody>
            <tr>
                <td>35059970</td>
                <td>2022-07-20T04:39:09</td>
                <td>some</td>
                <td>some</td>
                <td>some</td>
                <td>some</td>
                <td>some</td>
                <td>some</td>
                <td>some</td>
                <td>some</td>
            </tr>
        </tbody>
    </table>
</div>

但在微软边缘, 线条实际上是断线的。 但为什么?以及如何防止它,以使行为与其他浏览器相同?

旁注:这只是一个示例,实际上我有一个包含许多适合 1200 像素的列的表格。而且问题当然更糟,因为 ms-edge 总是创建多列。

    标签: html css twitter-bootstrap microsoft-edge


    【解决方案1】:

    可能将.text-nowrap 添加到整个表中,但也许有更好的方法?

    <table class="text-nowrap">
    

    【讨论】:

      猜你喜欢
      • 2018-02-03
      • 2019-03-03
      • 2018-01-31
      • 1970-01-01
      • 2015-12-27
      • 2010-11-25
      • 1970-01-01
      • 1970-01-01
      • 2013-07-27
      相关资源
      最近更新 更多