【问题标题】:Why is Firefox filling my thead as the entire height of the table?为什么 Firefox 将我的头部填充为整个桌子的高度?
【发布时间】:2021-06-22 12:12:11
【问题描述】:

这里有一个问题:

https://jsfiddle.net/gtfoeasy/8/

<html>
    <head></head>
    <body>
        <table style="min-height: 100px">
            <thead>
                <tr><td style="background: blue">Test</td></tr>
            </thead>
        </table>
    </body>
</html>

在 Firefox 中,thead 填充了表格的整个高度,而在 chrome 中则没有。

这似乎是一个给我带来问题的新问题。

有什么办法可以解决这个问题吗?

【问题讨论】:

  • 因为当前的 Chrome 不尊重您在桌子上的最小高度。 Chrome Canary 的功能与 Firefox 相同。
  • 如果您的表格中没有其他任何东西,即如果这是表格的全部内容,为什么不应该填满整个高度?
  • @Johannes 为什么它在 Firefox 中填充,但在 Chrome 中却没有?我希望thead 的高度不是 100%。

标签: css firefox html-table


【解决方案1】:

到目前为止,我已经能够推断出,Firefox 做出了改变,表格现在继承了父 div 的 flex 属性,而之前没有。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-09
    • 2022-11-11
    • 2017-05-23
    • 2013-02-26
    • 2011-01-16
    • 1970-01-01
    相关资源
    最近更新 更多