Bootstrap 如何在mircosoft edge中防止引导表中出现换行符?

e0bqpujr  于 2022-12-08  发布在  Bootstrap
关注(0)|答案(1)|浏览(93)

我有一个带有时间戳的简单表格,如果你把浏览器宽度缩小到〈600 px,底部的滚动条就会出现,这样你就可以左右移动表格,但是列没有分成多行。
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>

但是:在microsoft-edge中,行实际上是断开的。但是为什么呢?我怎样才能防止它,这样行为就和其他浏览器一样了?
旁注:这只是一个例子,实际上我有一个1200 px的表格,有很多列,问题当然更严重,因为ms-edge总是创建多列。

os8fio9y

os8fio9y1#

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

<table class="text-nowrap">

相关问题