边界半径不在Firefox中舍入背景

时间:2018-03-12 16:26:28

标签: html css

我注意到Firefox没有正确显示我的表格,Chrome和IE正在按需运行。我在哪里看到问题出在表格的顶行和底行。我使用以下

来围绕桌子的边缘
table {
    border-radius: 15px;
}
.topLeft {
    border-top-left-radius: 15px;
}
.topRight {
    border-top-right-radius: 15px;

然后在我的表格中,标题行有类似的内容:

<tr bgcolor=#cc9933>
    <th width=100 align=center class=topLeft>Owner</th>
    <th width=50 class=topRight>Points</th>
</tr> 

问题是,对于Firefox,它看起来像标签中的bgcolor设置没有四舍五入。 Firefox是否搞砸了,或者Chrome和IE是否因某些编码错误而格外宽容?

enter image description here Firefox 58.0.2

enter image description here IE 11.1770.14393.0

enter image description here Chrome 64.0.3282.186

2 个答案:

答案 0 :(得分:1)

这似乎是一个跨浏览器的怪癖。您可以通过在单元格上设置背景来避免它:

inputstream2

Here it is in action on jsFiddle

为什么而言,这是the MDN documentation for border-radius的引用:

  

目前尚未定义内部表元素的行为

结果是Chrome允许th { background: #cc9933; } 拥有<tr>而Firefox则不允许border-radius。似乎没有人反对这个规范。

答案 1 :(得分:0)

尝试隐藏溢出内容

Skipping submodule