最小高度和表格单元格 [英] min-height and table cells

查看:168
本文介绍了最小高度和表格单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一些研究,但我只想问问谁比我更了解的人。

I've done a little bit of research on this, but I just wanted to ask to people who'd know much better than I.

这是真的吗?那么设置表格单元格的高度只能作为最小高度?
我知道在Firefox中这是真的,但是其他浏览器是如何发生的?

Is it true that setting a height to a table cell only acts as min-height? I know this is true in Firefox, but what other browsers does this happen in?

推荐答案

。我尝试加载以下代码:

Short answer: YES. I tried to load following code:

<table border="0" style="background-color: yellow;">
    <tr style="background-color: green;">
        <td>row 0 cell 0</td>
        <td>row 0 cell 1</td>
    </tr>
    <tr style="background-color: green;">
        <td height="50">row 1 cell 0</td>
        <td>row 1 cell 1</td>
    </tr>
    <tr style="background-color: green;">
        <td style="height: 50px;">row 2 cell 0</td>
        <td>row 2 cell 1</td>
    </tr>
</table>

两者(高度和样式)在浏览器中的工作方式相同:

Both (height and style) work the same in browsers I tried:


  • Linux

    • Google Chrome 19.0

    • Firefox 13.0

    • Konqueror 4.8


    • Google Chrome 19.0

    • Firefox 12.0和13.0

    • Internet Explorer 8

    这篇关于最小高度和表格单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆